// $ANTLR 3.0.1 smartidl.g 2010-09-28 17:11:37

	package org.latestbit.smartobjects.smartidlc.parser;

	import java.util.ArrayList;
	import java.util.Collection;	
	import org.latestbit.smartobjects.smartidlc.model.*;
	import org.latestbit.smartobjects.smartidlc.util.*;		


import org.antlr.runtime.*;
import java.util.Stack;
import java.util.List;
import java.util.ArrayList;


import org.antlr.runtime.tree.*;

@SuppressWarnings("unused")
public class smartidlParser extends Parser {
    public static final String[] tokenNames = new String[] {
        "<invalid>", "<EOR>", "<DOWN>", "<UP>", "Identifier", "StringLiteral", "CharacterLiteral", "HexLiteral", "OctalLiteral", "DecimalLiteral", "IntegerTypeSuffix", "HexDigit", "SignPrefix", "FloatingPointLiteral", "FloatTypeSuffix", "Exponent", "EscapeSequence", "UnicodeEscape", "OctalEscape", "Letter", "WS", "COMMENT", "LINE_COMMENT", "'namespace'", "';'", "'import'", "'typedef'", "'as'", "'encrypted'", "'required'", "'('", "')'", "'unsigned'", "'byte'", "'int16'", "'int32'", "'int64'", "'integer'", "'float'", "'double'", "'number'", "'max-precision'", "'='", "'unicode'", "'string'", "'char'", "'boolean'", "'datetime'", "'to'", "','", "'allowed'", "'array'", "'of'", "'list'", "'map'", "'by'", "'enum'", "'{'", "'}'", "'structure'", "'extends'", "'exception'", "'choice'", "'interface'", "'sessionid'", "'void'", "'throws'", "'.'", "'null'", "'true'", "'false'"
    };
    public static final int HexLiteral=7;
    public static final int LINE_COMMENT=22;
    public static final int FloatTypeSuffix=14;
    public static final int OctalLiteral=8;
    public static final int IntegerTypeSuffix=10;
    public static final int CharacterLiteral=6;
    public static final int Exponent=15;
    public static final int EOF=-1;
    public static final int DecimalLiteral=9;
    public static final int HexDigit=11;
    public static final int SignPrefix=12;
    public static final int Identifier=4;
    public static final int StringLiteral=5;
    public static final int WS=20;
    public static final int UnicodeEscape=17;
    public static final int FloatingPointLiteral=13;
    public static final int COMMENT=21;
    public static final int EscapeSequence=16;
    public static final int OctalEscape=18;
    public static final int Letter=19;

        public smartidlParser(TokenStream input) {
            super(input);
        }
        
    protected TreeAdaptor adaptor = new CommonTreeAdaptor();

    public void setTreeAdaptor(TreeAdaptor adaptor) {
        this.adaptor = adaptor;
    }
    public TreeAdaptor getTreeAdaptor() {
        return adaptor;
    }

    public String[] getTokenNames() { return tokenNames; }
    public String getGrammarFileName() { return "smartidl.g"; }

     
      protected void mismatch(IntStream input, int ttype, BitSet follow) 
        throws RecognitionException { 
        throw new MismatchedTokenException(ttype, input); 
      } 
      public void recoverFromMismatchedSet(
          IntStream input, RecognitionException e, BitSet follow) 
          throws RecognitionException { 
        throw e; 
      } 


    public static class startCompilation_return extends ParserRuleReturnScope {
        public IDLNamespace namespace;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start startCompilation
    // smartidl.g:69:1: startCompilation returns [IDLNamespace namespace] : namespaceDeclaration[$namespace] importDeclarationList[$namespace] globalDeclarationList[$namespace] EOF ;
    public final startCompilation_return startCompilation() throws RecognitionException {
        startCompilation_return retval = new startCompilation_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token EOF4=null;
        namespaceDeclaration_return namespaceDeclaration1 = null;

        importDeclarationList_return importDeclarationList2 = null;

        globalDeclarationList_return globalDeclarationList3 = null;


        Object EOF4_tree=null;


        	retval.namespace = new IDLNamespace();

        try {
            // smartidl.g:73:2: ( namespaceDeclaration[$namespace] importDeclarationList[$namespace] globalDeclarationList[$namespace] EOF )
            // smartidl.g:73:4: namespaceDeclaration[$namespace] importDeclarationList[$namespace] globalDeclarationList[$namespace] EOF
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_namespaceDeclaration_in_startCompilation76);
            namespaceDeclaration1=namespaceDeclaration(retval.namespace);
            _fsp--;

            adaptor.addChild(root_0, namespaceDeclaration1.getTree());
            pushFollow(FOLLOW_importDeclarationList_in_startCompilation82);
            importDeclarationList2=importDeclarationList(retval.namespace);
            _fsp--;

            adaptor.addChild(root_0, importDeclarationList2.getTree());
            pushFollow(FOLLOW_globalDeclarationList_in_startCompilation88);
            globalDeclarationList3=globalDeclarationList(retval.namespace);
            _fsp--;

            adaptor.addChild(root_0, globalDeclarationList3.getTree());
            EOF4=(Token)input.LT(1);
            match(input,EOF,FOLLOW_EOF_in_startCompilation94); 
            EOF4_tree = (Object)adaptor.create(EOF4);
            adaptor.addChild(root_0, EOF4_tree);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end startCompilation

    public static class namespaceDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start namespaceDeclaration
    // smartidl.g:79:1: namespaceDeclaration[IDLNamespace namespace] : 'namespace' qualifiedName ';' ;
    public final namespaceDeclaration_return namespaceDeclaration(IDLNamespace namespace) throws RecognitionException {
        namespaceDeclaration_return retval = new namespaceDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal5=null;
        Token char_literal7=null;
        qualifiedName_return qualifiedName6 = null;


        Object string_literal5_tree=null;
        Object char_literal7_tree=null;

        try {
            // smartidl.g:80:2: ( 'namespace' qualifiedName ';' )
            // smartidl.g:80:4: 'namespace' qualifiedName ';'
            {
            root_0 = (Object)adaptor.nil();

            string_literal5=(Token)input.LT(1);
            match(input,23,FOLLOW_23_in_namespaceDeclaration109); 
            string_literal5_tree = (Object)adaptor.create(string_literal5);
            adaptor.addChild(root_0, string_literal5_tree);

            pushFollow(FOLLOW_qualifiedName_in_namespaceDeclaration111);
            qualifiedName6=qualifiedName();
            _fsp--;

            adaptor.addChild(root_0, qualifiedName6.getTree());
            char_literal7=(Token)input.LT(1);
            match(input,24,FOLLOW_24_in_namespaceDeclaration113); 
            char_literal7_tree = (Object)adaptor.create(char_literal7);
            adaptor.addChild(root_0, char_literal7_tree);


            		namespace.setName ( input.toString(qualifiedName6.start,qualifiedName6.stop) );
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end namespaceDeclaration

    public static class importDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start importDeclaration
    // smartidl.g:86:1: importDeclaration[IDLNamespace namespace] : 'import' qualifiedName ';' ;
    public final importDeclaration_return importDeclaration(IDLNamespace namespace) throws RecognitionException {
        importDeclaration_return retval = new importDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal8=null;
        Token char_literal10=null;
        qualifiedName_return qualifiedName9 = null;


        Object string_literal8_tree=null;
        Object char_literal10_tree=null;

        try {
            // smartidl.g:87:2: ( 'import' qualifiedName ';' )
            // smartidl.g:87:4: 'import' qualifiedName ';'
            {
            root_0 = (Object)adaptor.nil();

            string_literal8=(Token)input.LT(1);
            match(input,25,FOLLOW_25_in_importDeclaration133); 
            string_literal8_tree = (Object)adaptor.create(string_literal8);
            adaptor.addChild(root_0, string_literal8_tree);

            pushFollow(FOLLOW_qualifiedName_in_importDeclaration135);
            qualifiedName9=qualifiedName();
            _fsp--;

            adaptor.addChild(root_0, qualifiedName9.getTree());
            char_literal10=(Token)input.LT(1);
            match(input,24,FOLLOW_24_in_importDeclaration137); 
            char_literal10_tree = (Object)adaptor.create(char_literal10);
            adaptor.addChild(root_0, char_literal10_tree);


            		namespace.getImportedNamespacesLinks().add(input.toString(qualifiedName9.start,qualifiedName9.stop));
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end importDeclaration

    public static class importDeclarationList_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start importDeclarationList
    // smartidl.g:93:1: importDeclarationList[IDLNamespace namespace] : ( importDeclaration[$namespace] )* ;
    public final importDeclarationList_return importDeclarationList(IDLNamespace namespace) throws RecognitionException {
        importDeclarationList_return retval = new importDeclarationList_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        importDeclaration_return importDeclaration11 = null;



        try {
            // smartidl.g:94:2: ( ( importDeclaration[$namespace] )* )
            // smartidl.g:94:4: ( importDeclaration[$namespace] )*
            {
            root_0 = (Object)adaptor.nil();

            // smartidl.g:94:4: ( importDeclaration[$namespace] )*
            loop1:
            do {
                int alt1=2;
                int LA1_0 = input.LA(1);

                if ( (LA1_0==25) ) {
                    alt1=1;
                }


                switch (alt1) {
            	case 1 :
            	    // smartidl.g:94:5: importDeclaration[$namespace]
            	    {
            	    pushFollow(FOLLOW_importDeclaration_in_importDeclarationList155);
            	    importDeclaration11=importDeclaration(namespace);
            	    _fsp--;

            	    adaptor.addChild(root_0, importDeclaration11.getTree());

            	    }
            	    break;

            	default :
            	    break loop1;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end importDeclarationList

    public static class globalDeclarationList_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start globalDeclarationList
    // smartidl.g:97:1: globalDeclarationList[IDLNamespace namespace] : ( globalDeclaration[$namespace] )* ;
    public final globalDeclarationList_return globalDeclarationList(IDLNamespace namespace) throws RecognitionException {
        globalDeclarationList_return retval = new globalDeclarationList_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        globalDeclaration_return globalDeclaration12 = null;



        try {
            // smartidl.g:98:2: ( ( globalDeclaration[$namespace] )* )
            // smartidl.g:98:4: ( globalDeclaration[$namespace] )*
            {
            root_0 = (Object)adaptor.nil();

            // smartidl.g:98:4: ( globalDeclaration[$namespace] )*
            loop2:
            do {
                int alt2=2;
                int LA2_0 = input.LA(1);

                if ( (LA2_0==26||LA2_0==56||LA2_0==59||(LA2_0>=61 && LA2_0<=63)) ) {
                    alt2=1;
                }


                switch (alt2) {
            	case 1 :
            	    // smartidl.g:98:5: globalDeclaration[$namespace]
            	    {
            	    pushFollow(FOLLOW_globalDeclaration_in_globalDeclarationList174);
            	    globalDeclaration12=globalDeclaration(namespace);
            	    _fsp--;

            	    adaptor.addChild(root_0, globalDeclaration12.getTree());

            	    }
            	    break;

            	default :
            	    break loop2;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end globalDeclarationList

    public static class globalDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start globalDeclaration
    // smartidl.g:101:1: globalDeclaration[IDLNamespace namespace] : ( typedefDeclaration | enumDeclaration | structureDeclaration | exceptionDeclaration | choiceDeclaration | interfaceDeclaration ) ( ';' )? ;
    public final globalDeclaration_return globalDeclaration(IDLNamespace namespace) throws RecognitionException {
        globalDeclaration_return retval = new globalDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token char_literal19=null;
        typedefDeclaration_return typedefDeclaration13 = null;

        enumDeclaration_return enumDeclaration14 = null;

        structureDeclaration_return structureDeclaration15 = null;

        exceptionDeclaration_return exceptionDeclaration16 = null;

        choiceDeclaration_return choiceDeclaration17 = null;

        interfaceDeclaration_return interfaceDeclaration18 = null;


        Object char_literal19_tree=null;

        try {
            // smartidl.g:102:2: ( ( typedefDeclaration | enumDeclaration | structureDeclaration | exceptionDeclaration | choiceDeclaration | interfaceDeclaration ) ( ';' )? )
            // smartidl.g:102:5: ( typedefDeclaration | enumDeclaration | structureDeclaration | exceptionDeclaration | choiceDeclaration | interfaceDeclaration ) ( ';' )?
            {
            root_0 = (Object)adaptor.nil();

            // smartidl.g:102:5: ( typedefDeclaration | enumDeclaration | structureDeclaration | exceptionDeclaration | choiceDeclaration | interfaceDeclaration )
            int alt3=6;
            switch ( input.LA(1) ) {
            case 26:
                {
                alt3=1;
                }
                break;
            case 56:
                {
                alt3=2;
                }
                break;
            case 59:
                {
                alt3=3;
                }
                break;
            case 61:
                {
                alt3=4;
                }
                break;
            case 62:
                {
                alt3=5;
                }
                break;
            case 63:
                {
                alt3=6;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("102:5: ( typedefDeclaration | enumDeclaration | structureDeclaration | exceptionDeclaration | choiceDeclaration | interfaceDeclaration )", 3, 0, input);

                throw nvae;
            }

            switch (alt3) {
                case 1 :
                    // smartidl.g:103:4: typedefDeclaration
                    {
                    pushFollow(FOLLOW_typedefDeclaration_in_globalDeclaration200);
                    typedefDeclaration13=typedefDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, typedefDeclaration13.getTree());

                    				namespace.getTypedefs().add ( typedefDeclaration13.idlTypeDef );
                    				typedefDeclaration13.idlTypeDef.setNamespace ( namespace );
                    			

                    }
                    break;
                case 2 :
                    // smartidl.g:108:6: enumDeclaration
                    {
                    pushFollow(FOLLOW_enumDeclaration_in_globalDeclaration213);
                    enumDeclaration14=enumDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, enumDeclaration14.getTree());

                    				namespace.getEnums().add ( enumDeclaration14.idlEnum );
                    				enumDeclaration14.idlEnum.setNamespace ( namespace );
                    			

                    }
                    break;
                case 3 :
                    // smartidl.g:113:5: structureDeclaration
                    {
                    pushFollow(FOLLOW_structureDeclaration_in_globalDeclaration227);
                    structureDeclaration15=structureDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, structureDeclaration15.getTree());

                    				namespace.getStructures().add ( structureDeclaration15.idlStructure );
                    				structureDeclaration15.idlStructure.setNamespace ( namespace );
                    			

                    }
                    break;
                case 4 :
                    // smartidl.g:118:5: exceptionDeclaration
                    {
                    pushFollow(FOLLOW_exceptionDeclaration_in_globalDeclaration238);
                    exceptionDeclaration16=exceptionDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, exceptionDeclaration16.getTree());

                    				namespace.getExceptions().add ( exceptionDeclaration16.idlException );
                    				exceptionDeclaration16.idlException.setNamespace ( namespace );
                    			

                    }
                    break;
                case 5 :
                    // smartidl.g:123:5: choiceDeclaration
                    {
                    pushFollow(FOLLOW_choiceDeclaration_in_globalDeclaration252);
                    choiceDeclaration17=choiceDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, choiceDeclaration17.getTree());

                    				namespace.getChoices().add ( choiceDeclaration17.idlChoice );
                    				choiceDeclaration17.idlChoice.setNamespace ( namespace );
                    			

                    }
                    break;
                case 6 :
                    // smartidl.g:128:6: interfaceDeclaration
                    {
                    pushFollow(FOLLOW_interfaceDeclaration_in_globalDeclaration266);
                    interfaceDeclaration18=interfaceDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, interfaceDeclaration18.getTree());

                    				namespace.getInterfaces().add ( interfaceDeclaration18.idlInterface );
                    				interfaceDeclaration18.idlInterface.setNamespace ( namespace );
                    			

                    }
                    break;

            }

            // smartidl.g:133:5: ( ';' )?
            int alt4=2;
            int LA4_0 = input.LA(1);

            if ( (LA4_0==24) ) {
                alt4=1;
            }
            switch (alt4) {
                case 1 :
                    // smartidl.g:133:6: ';'
                    {
                    char_literal19=(Token)input.LT(1);
                    match(input,24,FOLLOW_24_in_globalDeclaration281); 
                    char_literal19_tree = (Object)adaptor.create(char_literal19);
                    adaptor.addChild(root_0, char_literal19_tree);


                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end globalDeclaration

    public static class typedefDeclaration_return extends ParserRuleReturnScope {
        public IDLTypeDef idlTypeDef;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start typedefDeclaration
    // smartidl.g:136:1: typedefDeclaration returns [IDLTypeDef idlTypeDef] : 'typedef' type= datatypeDeclaration 'as' name= Identifier ;
    public final typedefDeclaration_return typedefDeclaration() throws RecognitionException {
        typedefDeclaration_return retval = new typedefDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token string_literal20=null;
        Token string_literal21=null;
        datatypeDeclaration_return type = null;


        Object name_tree=null;
        Object string_literal20_tree=null;
        Object string_literal21_tree=null;


        	retval.idlTypeDef = new IDLTypeDef();

        try {
            // smartidl.g:140:2: ( 'typedef' type= datatypeDeclaration 'as' name= Identifier )
            // smartidl.g:140:4: 'typedef' type= datatypeDeclaration 'as' name= Identifier
            {
            root_0 = (Object)adaptor.nil();

            string_literal20=(Token)input.LT(1);
            match(input,26,FOLLOW_26_in_typedefDeclaration304); 
            string_literal20_tree = (Object)adaptor.create(string_literal20);
            adaptor.addChild(root_0, string_literal20_tree);

            pushFollow(FOLLOW_datatypeDeclaration_in_typedefDeclaration308);
            type=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, type.getTree());
            string_literal21=(Token)input.LT(1);
            match(input,27,FOLLOW_27_in_typedefDeclaration310); 
            string_literal21_tree = (Object)adaptor.create(string_literal21);
            adaptor.addChild(root_0, string_literal21_tree);

            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_typedefDeclaration314); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);


            			retval.idlTypeDef.setName ( name.getText() );
            			retval.idlTypeDef.setRefDataType ( type.idlDataType );	
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end typedefDeclaration

    public static class datatypeDeclaration_return extends ParserRuleReturnScope {
        public IDLDataType idlDataType;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start datatypeDeclaration
    // smartidl.g:147:1: datatypeDeclaration returns [IDLDataType idlDataType] : ( 'encrypted' )? ( 'required' )? ( primitiveType | complexType | qualifiedName ) ;
    public final datatypeDeclaration_return datatypeDeclaration() throws RecognitionException {
        datatypeDeclaration_return retval = new datatypeDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal22=null;
        Token string_literal23=null;
        primitiveType_return primitiveType24 = null;

        complexType_return complexType25 = null;

        qualifiedName_return qualifiedName26 = null;


        Object string_literal22_tree=null;
        Object string_literal23_tree=null;


        	retval.idlDataType = new IDLDataType();

        try {
            // smartidl.g:151:2: ( ( 'encrypted' )? ( 'required' )? ( primitiveType | complexType | qualifiedName ) )
            // smartidl.g:151:4: ( 'encrypted' )? ( 'required' )? ( primitiveType | complexType | qualifiedName )
            {
            root_0 = (Object)adaptor.nil();

            // smartidl.g:151:4: ( 'encrypted' )?
            int alt5=2;
            int LA5_0 = input.LA(1);

            if ( (LA5_0==28) ) {
                alt5=1;
            }
            switch (alt5) {
                case 1 :
                    // smartidl.g:151:5: 'encrypted'
                    {
                    string_literal22=(Token)input.LT(1);
                    match(input,28,FOLLOW_28_in_datatypeDeclaration341); 
                    string_literal22_tree = (Object)adaptor.create(string_literal22);
                    adaptor.addChild(root_0, string_literal22_tree);


                    			retval.idlDataType.setEncrypted(true);
                    		

                    }
                    break;

            }

            // smartidl.g:154:3: ( 'required' )?
            int alt6=2;
            int LA6_0 = input.LA(1);

            if ( (LA6_0==29) ) {
                alt6=1;
            }
            switch (alt6) {
                case 1 :
                    // smartidl.g:154:4: 'required'
                    {
                    string_literal23=(Token)input.LT(1);
                    match(input,29,FOLLOW_29_in_datatypeDeclaration349); 
                    string_literal23_tree = (Object)adaptor.create(string_literal23);
                    adaptor.addChild(root_0, string_literal23_tree);


                    			retval.idlDataType.setRequired(true);
                    		

                    }
                    break;

            }

            // smartidl.g:157:3: ( primitiveType | complexType | qualifiedName )
            int alt7=3;
            switch ( input.LA(1) ) {
            case 32:
            case 33:
            case 34:
            case 35:
            case 36:
            case 37:
            case 38:
            case 39:
            case 40:
            case 43:
            case 44:
            case 45:
            case 46:
            case 47:
                {
                alt7=1;
                }
                break;
            case 30:
            case 51:
            case 53:
            case 54:
                {
                alt7=2;
                }
                break;
            case Identifier:
                {
                alt7=3;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("157:3: ( primitiveType | complexType | qualifiedName )", 7, 0, input);

                throw nvae;
            }

            switch (alt7) {
                case 1 :
                    // smartidl.g:158:4: primitiveType
                    {
                    pushFollow(FOLLOW_primitiveType_in_datatypeDeclaration364);
                    primitiveType24=primitiveType();
                    _fsp--;

                    adaptor.addChild(root_0, primitiveType24.getTree());
                     retval.idlDataType.setTypeId(IDLDataType.DataTypeId.PRIMITIVE); retval.idlDataType.setPrimitiveType(primitiveType24.primitiveType); 

                    }
                    break;
                case 2 :
                    // smartidl.g:159:6: complexType
                    {
                    pushFollow(FOLLOW_complexType_in_datatypeDeclaration374);
                    complexType25=complexType();
                    _fsp--;

                    adaptor.addChild(root_0, complexType25.getTree());
                     retval.idlDataType.setTypeId(IDLDataType.DataTypeId.COMPLEX); retval.idlDataType.setComplexType(complexType25.complexType); 

                    }
                    break;
                case 3 :
                    // smartidl.g:160:6: qualifiedName
                    {
                    pushFollow(FOLLOW_qualifiedName_in_datatypeDeclaration383);
                    qualifiedName26=qualifiedName();
                    _fsp--;

                    adaptor.addChild(root_0, qualifiedName26.getTree());
                     retval.idlDataType.setTypeId(IDLDataType.DataTypeId.QUALIFIED_NAME); retval.idlDataType.setName(input.toString(qualifiedName26.start,qualifiedName26.stop));

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end datatypeDeclaration

    public static class complexType_return extends ParserRuleReturnScope {
        public IDLComplexType complexType;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start complexType
    // smartidl.g:164:1: complexType returns [IDLComplexType complexType] : ( arrayDeclaration[$complexType] | listDeclaration[$complexType] | mapDeclaration[$complexType] | '(' ct= complexType ')' );
    public final complexType_return complexType() throws RecognitionException {
        complexType_return retval = new complexType_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token char_literal30=null;
        Token char_literal31=null;
        complexType_return ct = null;

        arrayDeclaration_return arrayDeclaration27 = null;

        listDeclaration_return listDeclaration28 = null;

        mapDeclaration_return mapDeclaration29 = null;


        Object char_literal30_tree=null;
        Object char_literal31_tree=null;


        	retval.complexType = new IDLComplexType();

        try {
            // smartidl.g:168:2: ( arrayDeclaration[$complexType] | listDeclaration[$complexType] | mapDeclaration[$complexType] | '(' ct= complexType ')' )
            int alt8=4;
            switch ( input.LA(1) ) {
            case 51:
                {
                alt8=1;
                }
                break;
            case 53:
                {
                alt8=2;
                }
                break;
            case 54:
                {
                alt8=3;
                }
                break;
            case 30:
                {
                alt8=4;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("164:1: complexType returns [IDLComplexType complexType] : ( arrayDeclaration[$complexType] | listDeclaration[$complexType] | mapDeclaration[$complexType] | '(' ct= complexType ')' );", 8, 0, input);

                throw nvae;
            }

            switch (alt8) {
                case 1 :
                    // smartidl.g:168:4: arrayDeclaration[$complexType]
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_arrayDeclaration_in_complexType410);
                    arrayDeclaration27=arrayDeclaration(retval.complexType);
                    _fsp--;

                    adaptor.addChild(root_0, arrayDeclaration27.getTree());

                    }
                    break;
                case 2 :
                    // smartidl.g:169:4: listDeclaration[$complexType]
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_listDeclaration_in_complexType417);
                    listDeclaration28=listDeclaration(retval.complexType);
                    _fsp--;

                    adaptor.addChild(root_0, listDeclaration28.getTree());

                    }
                    break;
                case 3 :
                    // smartidl.g:170:4: mapDeclaration[$complexType]
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_mapDeclaration_in_complexType424);
                    mapDeclaration29=mapDeclaration(retval.complexType);
                    _fsp--;

                    adaptor.addChild(root_0, mapDeclaration29.getTree());

                    }
                    break;
                case 4 :
                    // smartidl.g:171:6: '(' ct= complexType ')'
                    {
                    root_0 = (Object)adaptor.nil();

                    char_literal30=(Token)input.LT(1);
                    match(input,30,FOLLOW_30_in_complexType433); 
                    char_literal30_tree = (Object)adaptor.create(char_literal30);
                    adaptor.addChild(root_0, char_literal30_tree);

                    pushFollow(FOLLOW_complexType_in_complexType439);
                    ct=complexType();
                    _fsp--;

                    adaptor.addChild(root_0, ct.getTree());
                    char_literal31=(Token)input.LT(1);
                    match(input,31,FOLLOW_31_in_complexType441); 
                    char_literal31_tree = (Object)adaptor.create(char_literal31);
                    adaptor.addChild(root_0, char_literal31_tree);

                     retval.complexType = ct.complexType; 

                    }
                    break;

            }
            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end complexType

    public static class primitiveType_return extends ParserRuleReturnScope {
        public IDLPrimitiveType primitiveType;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start primitiveType
    // smartidl.g:174:1: primitiveType returns [IDLPrimitiveType primitiveType] : ( ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )? | 'integer' (integerRanges= integerTypeConstraint )? | ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )? | ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )? | ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )? | ( 'unicode' )? 'char' | 'boolean' | 'datetime' ) ;
    public final primitiveType_return primitiveType() throws RecognitionException {
        primitiveType_return retval = new primitiveType_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal32=null;
        Token string_literal33=null;
        Token string_literal34=null;
        Token string_literal35=null;
        Token string_literal36=null;
        Token string_literal37=null;
        Token string_literal38=null;
        Token string_literal39=null;
        Token string_literal40=null;
        Token string_literal41=null;
        Token char_literal42=null;
        Token string_literal43=null;
        Token string_literal44=null;
        Token string_literal45=null;
        Token string_literal46=null;
        Token string_literal47=null;
        Token string_literal48=null;
        integerTypeConstraint_return intRanges = null;

        integerTypeConstraint_return integerRanges = null;

        floatTypeConstraint_return floatRanges = null;

        integerLiteral_return maxprecision = null;

        stringSizeConstraint_return strSizeConstraint = null;

        stringMaskConstraint_return strMaskConstraint = null;


        Object string_literal32_tree=null;
        Object string_literal33_tree=null;
        Object string_literal34_tree=null;
        Object string_literal35_tree=null;
        Object string_literal36_tree=null;
        Object string_literal37_tree=null;
        Object string_literal38_tree=null;
        Object string_literal39_tree=null;
        Object string_literal40_tree=null;
        Object string_literal41_tree=null;
        Object char_literal42_tree=null;
        Object string_literal43_tree=null;
        Object string_literal44_tree=null;
        Object string_literal45_tree=null;
        Object string_literal46_tree=null;
        Object string_literal47_tree=null;
        Object string_literal48_tree=null;


        	retval.primitiveType = new IDLPrimitiveType();
        	boolean isUnsigned = false;
        	boolean isUnicode = false;

        try {
            // smartidl.g:180:2: ( ( ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )? | 'integer' (integerRanges= integerTypeConstraint )? | ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )? | ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )? | ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )? | ( 'unicode' )? 'char' | 'boolean' | 'datetime' ) )
            // smartidl.g:180:4: ( ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )? | 'integer' (integerRanges= integerTypeConstraint )? | ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )? | ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )? | ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )? | ( 'unicode' )? 'char' | 'boolean' | 'datetime' )
            {
            root_0 = (Object)adaptor.nil();

            // smartidl.g:180:4: ( ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )? | 'integer' (integerRanges= integerTypeConstraint )? | ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )? | ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )? | ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )? | ( 'unicode' )? 'char' | 'boolean' | 'datetime' )
            int alt21=8;
            switch ( input.LA(1) ) {
            case 32:
            case 33:
            case 34:
            case 35:
            case 36:
                {
                alt21=1;
                }
                break;
            case 37:
                {
                alt21=2;
                }
                break;
            case 38:
            case 39:
                {
                alt21=3;
                }
                break;
            case 40:
                {
                alt21=4;
                }
                break;
            case 43:
                {
                int LA21_5 = input.LA(2);

                if ( (LA21_5==44) ) {
                    alt21=5;
                }
                else if ( (LA21_5==45) ) {
                    alt21=6;
                }
                else {
                    NoViableAltException nvae =
                        new NoViableAltException("180:4: ( ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )? | 'integer' (integerRanges= integerTypeConstraint )? | ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )? | ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )? | ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )? | ( 'unicode' )? 'char' | 'boolean' | 'datetime' )", 21, 5, input);

                    throw nvae;
                }
                }
                break;
            case 44:
                {
                alt21=5;
                }
                break;
            case 45:
                {
                alt21=6;
                }
                break;
            case 46:
                {
                alt21=7;
                }
                break;
            case 47:
                {
                alt21=8;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("180:4: ( ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )? | 'integer' (integerRanges= integerTypeConstraint )? | ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )? | ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )? | ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )? | ( 'unicode' )? 'char' | 'boolean' | 'datetime' )", 21, 0, input);

                throw nvae;
            }

            switch (alt21) {
                case 1 :
                    // smartidl.g:180:6: ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) ) (intRanges= integerTypeConstraint )?
                    {
                    // smartidl.g:180:6: ( ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) ) )
                    // smartidl.g:180:8: ( 'unsigned' )? ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) )
                    {
                    // smartidl.g:180:8: ( 'unsigned' )?
                    int alt9=2;
                    int LA9_0 = input.LA(1);

                    if ( (LA9_0==32) ) {
                        alt9=1;
                    }
                    switch (alt9) {
                        case 1 :
                            // smartidl.g:180:9: 'unsigned'
                            {
                            string_literal32=(Token)input.LT(1);
                            match(input,32,FOLLOW_32_in_primitiveType470); 
                            string_literal32_tree = (Object)adaptor.create(string_literal32);
                            adaptor.addChild(root_0, string_literal32_tree);

                             isUnsigned = true; 

                            }
                            break;

                    }

                    // smartidl.g:181:5: ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) )
                    int alt10=4;
                    switch ( input.LA(1) ) {
                    case 33:
                        {
                        alt10=1;
                        }
                        break;
                    case 34:
                        {
                        alt10=2;
                        }
                        break;
                    case 35:
                        {
                        alt10=3;
                        }
                        break;
                    case 36:
                        {
                        alt10=4;
                        }
                        break;
                    default:
                        NoViableAltException nvae =
                            new NoViableAltException("181:5: ( 'byte' | ( 'int16' ) | ( 'int32' ) | ( 'int64' ) )", 10, 0, input);

                        throw nvae;
                    }

                    switch (alt10) {
                        case 1 :
                            // smartidl.g:181:7: 'byte'
                            {
                            string_literal33=(Token)input.LT(1);
                            match(input,33,FOLLOW_33_in_primitiveType483); 
                            string_literal33_tree = (Object)adaptor.create(string_literal33);
                            adaptor.addChild(root_0, string_literal33_tree);

                             retval.primitiveType.setTypeId ( isUnsigned ? IDLPrimitiveType.TypeId.UNSIGNED_BYTE : IDLPrimitiveType.TypeId.BYTE ); 

                            }
                            break;
                        case 2 :
                            // smartidl.g:182:8: ( 'int16' )
                            {
                            // smartidl.g:182:8: ( 'int16' )
                            // smartidl.g:182:10: 'int16'
                            {
                            string_literal34=(Token)input.LT(1);
                            match(input,34,FOLLOW_34_in_primitiveType496); 
                            string_literal34_tree = (Object)adaptor.create(string_literal34);
                            adaptor.addChild(root_0, string_literal34_tree);


                            }

                             retval.primitiveType.setTypeId ( isUnsigned ? IDLPrimitiveType.TypeId.UINT16 : IDLPrimitiveType.TypeId.INT16 ); 

                            }
                            break;
                        case 3 :
                            // smartidl.g:183:8: ( 'int32' )
                            {
                            // smartidl.g:183:8: ( 'int32' )
                            // smartidl.g:183:10: 'int32'
                            {
                            string_literal35=(Token)input.LT(1);
                            match(input,35,FOLLOW_35_in_primitiveType510); 
                            string_literal35_tree = (Object)adaptor.create(string_literal35);
                            adaptor.addChild(root_0, string_literal35_tree);


                            }

                             retval.primitiveType.setTypeId ( isUnsigned ? IDLPrimitiveType.TypeId.UINT32 : IDLPrimitiveType.TypeId.INT32 ); 

                            }
                            break;
                        case 4 :
                            // smartidl.g:184:8: ( 'int64' )
                            {
                            // smartidl.g:184:8: ( 'int64' )
                            // smartidl.g:184:10: 'int64'
                            {
                            string_literal36=(Token)input.LT(1);
                            match(input,36,FOLLOW_36_in_primitiveType524); 
                            string_literal36_tree = (Object)adaptor.create(string_literal36);
                            adaptor.addChild(root_0, string_literal36_tree);


                            }

                             retval.primitiveType.setTypeId ( isUnsigned ? IDLPrimitiveType.TypeId.UINT64 : IDLPrimitiveType.TypeId.INT64 ); 

                            }
                            break;

                    }


                    }

                    // smartidl.g:186:6: (intRanges= integerTypeConstraint )?
                    int alt11=2;
                    int LA11_0 = input.LA(1);

                    if ( (LA11_0==30) ) {
                        alt11=1;
                    }
                    switch (alt11) {
                        case 1 :
                            // smartidl.g:186:7: intRanges= integerTypeConstraint
                            {
                            pushFollow(FOLLOW_integerTypeConstraint_in_primitiveType548);
                            intRanges=integerTypeConstraint();
                            _fsp--;

                            adaptor.addChild(root_0, intRanges.getTree());
                            retval.primitiveType.setRangeConstraints(intRanges.ranges); 

                            }
                            break;

                    }


                    }
                    break;
                case 2 :
                    // smartidl.g:187:6: 'integer' (integerRanges= integerTypeConstraint )?
                    {
                    string_literal37=(Token)input.LT(1);
                    match(input,37,FOLLOW_37_in_primitiveType563); 
                    string_literal37_tree = (Object)adaptor.create(string_literal37);
                    adaptor.addChild(root_0, string_literal37_tree);

                    // smartidl.g:187:16: (integerRanges= integerTypeConstraint )?
                    int alt12=2;
                    int LA12_0 = input.LA(1);

                    if ( (LA12_0==30) ) {
                        alt12=1;
                    }
                    switch (alt12) {
                        case 1 :
                            // smartidl.g:187:17: integerRanges= integerTypeConstraint
                            {
                            pushFollow(FOLLOW_integerTypeConstraint_in_primitiveType568);
                            integerRanges=integerTypeConstraint();
                            _fsp--;

                            adaptor.addChild(root_0, integerRanges.getTree());

                            }
                            break;

                    }


                    					if(integerRanges == null) {
                    						retval.primitiveType.setTypeId ( IDLPrimitiveType.TypeId.BIGINTEGER );
                    					}
                    					else {
                    						retval.primitiveType.setRangeConstraints(integerRanges.ranges);
                    						retval.primitiveType.setupIntTypeByConstraints();
                    					}
                    				

                    }
                    break;
                case 3 :
                    // smartidl.g:197:6: ( 'float' | 'double' ) (floatRanges= floatTypeConstraint )?
                    {
                    // smartidl.g:197:6: ( 'float' | 'double' )
                    int alt13=2;
                    int LA13_0 = input.LA(1);

                    if ( (LA13_0==38) ) {
                        alt13=1;
                    }
                    else if ( (LA13_0==39) ) {
                        alt13=2;
                    }
                    else {
                        NoViableAltException nvae =
                            new NoViableAltException("197:6: ( 'float' | 'double' )", 13, 0, input);

                        throw nvae;
                    }
                    switch (alt13) {
                        case 1 :
                            // smartidl.g:198:6: 'float'
                            {
                            string_literal38=(Token)input.LT(1);
                            match(input,38,FOLLOW_38_in_primitiveType597); 
                            string_literal38_tree = (Object)adaptor.create(string_literal38);
                            adaptor.addChild(root_0, string_literal38_tree);

                             retval.primitiveType.setTypeId ( IDLPrimitiveType.TypeId.FLOAT ); 

                            }
                            break;
                        case 2 :
                            // smartidl.g:199:8: 'double'
                            {
                            string_literal39=(Token)input.LT(1);
                            match(input,39,FOLLOW_39_in_primitiveType608); 
                            string_literal39_tree = (Object)adaptor.create(string_literal39);
                            adaptor.addChild(root_0, string_literal39_tree);

                             retval.primitiveType.setTypeId ( IDLPrimitiveType.TypeId.DOUBLE ); 

                            }
                            break;

                    }

                    // smartidl.g:200:7: (floatRanges= floatTypeConstraint )?
                    int alt14=2;
                    int LA14_0 = input.LA(1);

                    if ( (LA14_0==30) ) {
                        alt14=1;
                    }
                    switch (alt14) {
                        case 1 :
                            // smartidl.g:200:8: floatRanges= floatTypeConstraint
                            {
                            pushFollow(FOLLOW_floatTypeConstraint_in_primitiveType623);
                            floatRanges=floatTypeConstraint();
                            _fsp--;

                            adaptor.addChild(root_0, floatRanges.getTree());
                             retval.primitiveType.setRangeConstraints(floatRanges.ranges); 

                            }
                            break;

                    }


                    }
                    break;
                case 4 :
                    // smartidl.g:201:6: ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? ) (floatRanges= floatTypeConstraint )?
                    {
                    // smartidl.g:201:6: ( 'number' ( 'max-precision' '=' maxprecision= integerLiteral )? )
                    // smartidl.g:202:6: 'number' ( 'max-precision' '=' maxprecision= integerLiteral )?
                    {
                    string_literal40=(Token)input.LT(1);
                    match(input,40,FOLLOW_40_in_primitiveType641); 
                    string_literal40_tree = (Object)adaptor.create(string_literal40);
                    adaptor.addChild(root_0, string_literal40_tree);

                     retval.primitiveType.setTypeId ( IDLPrimitiveType.TypeId.BIGDECIMAL ); 
                    // smartidl.g:203:6: ( 'max-precision' '=' maxprecision= integerLiteral )?
                    int alt15=2;
                    int LA15_0 = input.LA(1);

                    if ( (LA15_0==41) ) {
                        alt15=1;
                    }
                    switch (alt15) {
                        case 1 :
                            // smartidl.g:203:7: 'max-precision' '=' maxprecision= integerLiteral
                            {
                            string_literal41=(Token)input.LT(1);
                            match(input,41,FOLLOW_41_in_primitiveType651); 
                            string_literal41_tree = (Object)adaptor.create(string_literal41);
                            adaptor.addChild(root_0, string_literal41_tree);

                            char_literal42=(Token)input.LT(1);
                            match(input,42,FOLLOW_42_in_primitiveType653); 
                            char_literal42_tree = (Object)adaptor.create(char_literal42);
                            adaptor.addChild(root_0, char_literal42_tree);

                            pushFollow(FOLLOW_integerLiteral_in_primitiveType657);
                            maxprecision=integerLiteral();
                            _fsp--;

                            adaptor.addChild(root_0, maxprecision.getTree());
                             retval.primitiveType.setBigDecimalMaxPrecision( Integer.valueOf(input.toString(maxprecision.start,maxprecision.stop)) ); 

                            }
                            break;

                    }


                    }

                    // smartidl.g:204:7: (floatRanges= floatTypeConstraint )?
                    int alt16=2;
                    int LA16_0 = input.LA(1);

                    if ( (LA16_0==30) ) {
                        alt16=1;
                    }
                    switch (alt16) {
                        case 1 :
                            // smartidl.g:204:8: floatRanges= floatTypeConstraint
                            {
                            pushFollow(FOLLOW_floatTypeConstraint_in_primitiveType676);
                            floatRanges=floatTypeConstraint();
                            _fsp--;

                            adaptor.addChild(root_0, floatRanges.getTree());
                             retval.primitiveType.setRangeConstraints(floatRanges.ranges); 

                            }
                            break;

                    }


                    }
                    break;
                case 5 :
                    // smartidl.g:205:6: ( 'unicode' )? 'string' (strSizeConstraint= stringSizeConstraint )? (strMaskConstraint= stringMaskConstraint )?
                    {
                    // smartidl.g:205:6: ( 'unicode' )?
                    int alt17=2;
                    int LA17_0 = input.LA(1);

                    if ( (LA17_0==43) ) {
                        alt17=1;
                    }
                    switch (alt17) {
                        case 1 :
                            // smartidl.g:205:7: 'unicode'
                            {
                            string_literal43=(Token)input.LT(1);
                            match(input,43,FOLLOW_43_in_primitiveType691); 
                            string_literal43_tree = (Object)adaptor.create(string_literal43);
                            adaptor.addChild(root_0, string_literal43_tree);

                             isUnicode = true; 

                            }
                            break;

                    }

                    string_literal44=(Token)input.LT(1);
                    match(input,44,FOLLOW_44_in_primitiveType697); 
                    string_literal44_tree = (Object)adaptor.create(string_literal44);
                    adaptor.addChild(root_0, string_literal44_tree);

                    // smartidl.g:205:50: (strSizeConstraint= stringSizeConstraint )?
                    int alt18=2;
                    int LA18_0 = input.LA(1);

                    if ( (LA18_0==30) ) {
                        alt18=1;
                    }
                    switch (alt18) {
                        case 1 :
                            // smartidl.g:205:51: strSizeConstraint= stringSizeConstraint
                            {
                            pushFollow(FOLLOW_stringSizeConstraint_in_primitiveType704);
                            strSizeConstraint=stringSizeConstraint();
                            _fsp--;

                            adaptor.addChild(root_0, strSizeConstraint.getTree());

                            }
                            break;

                    }

                    // smartidl.g:205:94: (strMaskConstraint= stringMaskConstraint )?
                    int alt19=2;
                    int LA19_0 = input.LA(1);

                    if ( (LA19_0==50) ) {
                        alt19=1;
                    }
                    switch (alt19) {
                        case 1 :
                            // smartidl.g:205:95: strMaskConstraint= stringMaskConstraint
                            {
                            pushFollow(FOLLOW_stringMaskConstraint_in_primitiveType713);
                            strMaskConstraint=stringMaskConstraint();
                            _fsp--;

                            adaptor.addChild(root_0, strMaskConstraint.getTree());

                            }
                            break;

                    }

                     
                    					retval.primitiveType.setTypeId ( isUnicode ? IDLPrimitiveType.TypeId.WSTRING : IDLPrimitiveType.TypeId.STRING);
                    					if (strSizeConstraint !=null) {
                    						retval.primitiveType.setStringSizeConstraint( strSizeConstraint.range );
                    					}
                    					if ( strMaskConstraint != null ) {
                    						retval.primitiveType.setStringMaskConstraints( strMaskConstraint.masks );
                    					} 
                    				

                    }
                    break;
                case 6 :
                    // smartidl.g:215:6: ( 'unicode' )? 'char'
                    {
                    // smartidl.g:215:6: ( 'unicode' )?
                    int alt20=2;
                    int LA20_0 = input.LA(1);

                    if ( (LA20_0==43) ) {
                        alt20=1;
                    }
                    switch (alt20) {
                        case 1 :
                            // smartidl.g:215:7: 'unicode'
                            {
                            string_literal45=(Token)input.LT(1);
                            match(input,43,FOLLOW_43_in_primitiveType730); 
                            string_literal45_tree = (Object)adaptor.create(string_literal45);
                            adaptor.addChild(root_0, string_literal45_tree);

                             isUnicode = true; 

                            }
                            break;

                    }

                    string_literal46=(Token)input.LT(1);
                    match(input,45,FOLLOW_45_in_primitiveType736); 
                    string_literal46_tree = (Object)adaptor.create(string_literal46);
                    adaptor.addChild(root_0, string_literal46_tree);

                     retval.primitiveType.setTypeId ( isUnicode ? IDLPrimitiveType.TypeId.WCHAR : IDLPrimitiveType.TypeId.CHAR); 

                    }
                    break;
                case 7 :
                    // smartidl.g:216:6: 'boolean'
                    {
                    string_literal47=(Token)input.LT(1);
                    match(input,46,FOLLOW_46_in_primitiveType747); 
                    string_literal47_tree = (Object)adaptor.create(string_literal47);
                    adaptor.addChild(root_0, string_literal47_tree);

                     retval.primitiveType.setTypeId ( IDLPrimitiveType.TypeId.BOOLEAN ); 

                    }
                    break;
                case 8 :
                    // smartidl.g:217:6: 'datetime'
                    {
                    string_literal48=(Token)input.LT(1);
                    match(input,47,FOLLOW_47_in_primitiveType756); 
                    string_literal48_tree = (Object)adaptor.create(string_literal48);
                    adaptor.addChild(root_0, string_literal48_tree);

                     retval.primitiveType.setTypeId ( IDLPrimitiveType.TypeId.DATETIME ); 

                    }
                    break;

            }


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end primitiveType

    public static class integerTypeConstraint_return extends ParserRuleReturnScope {
        public Collection < IDLPritiveTypeNumberRange<String> > ranges;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start integerTypeConstraint
    // smartidl.g:222:1: integerTypeConstraint returns [ Collection < IDLPritiveTypeNumberRange<String> > ranges ] : '(' min= integerLiteral ( 'to' max= integerLiteral )? ( ',' min= integerLiteral ( 'to' max= integerLiteral )? )* ')' ;
    public final integerTypeConstraint_return integerTypeConstraint() throws RecognitionException {
        integerTypeConstraint_return retval = new integerTypeConstraint_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token char_literal49=null;
        Token string_literal50=null;
        Token char_literal51=null;
        Token string_literal52=null;
        Token char_literal53=null;
        integerLiteral_return min = null;

        integerLiteral_return max = null;


        Object char_literal49_tree=null;
        Object string_literal50_tree=null;
        Object char_literal51_tree=null;
        Object string_literal52_tree=null;
        Object char_literal53_tree=null;


        	retval.ranges = new ArrayList< IDLPritiveTypeNumberRange<String> >() ;
        	IDLPritiveTypeNumberRange<String> range = new IDLPritiveTypeNumberRange<String>();

        try {
            // smartidl.g:227:2: ( '(' min= integerLiteral ( 'to' max= integerLiteral )? ( ',' min= integerLiteral ( 'to' max= integerLiteral )? )* ')' )
            // smartidl.g:227:4: '(' min= integerLiteral ( 'to' max= integerLiteral )? ( ',' min= integerLiteral ( 'to' max= integerLiteral )? )* ')'
            {
            root_0 = (Object)adaptor.nil();

            char_literal49=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_integerTypeConstraint785); 
            char_literal49_tree = (Object)adaptor.create(char_literal49);
            adaptor.addChild(root_0, char_literal49_tree);

            pushFollow(FOLLOW_integerLiteral_in_integerTypeConstraint792);
            min=integerLiteral();
            _fsp--;

            adaptor.addChild(root_0, min.getTree());
             range.setMin("0"); range.setMax(input.toString(min.start,min.stop)); 
            // smartidl.g:228:70: ( 'to' max= integerLiteral )?
            int alt22=2;
            int LA22_0 = input.LA(1);

            if ( (LA22_0==48) ) {
                alt22=1;
            }
            switch (alt22) {
                case 1 :
                    // smartidl.g:228:71: 'to' max= integerLiteral
                    {
                    string_literal50=(Token)input.LT(1);
                    match(input,48,FOLLOW_48_in_integerTypeConstraint797); 
                    string_literal50_tree = (Object)adaptor.create(string_literal50);
                    adaptor.addChild(root_0, string_literal50_tree);

                    pushFollow(FOLLOW_integerLiteral_in_integerTypeConstraint801);
                    max=integerLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, max.getTree());
                     range.setMin( range.getMax() ); range.setMax(input.toString(max.start,max.stop)); 

                    }
                    break;

            }

            retval.ranges.add(range);
            // smartidl.g:229:4: ( ',' min= integerLiteral ( 'to' max= integerLiteral )? )*
            loop24:
            do {
                int alt24=2;
                int LA24_0 = input.LA(1);

                if ( (LA24_0==49) ) {
                    alt24=1;
                }


                switch (alt24) {
            	case 1 :
            	    // smartidl.g:229:5: ',' min= integerLiteral ( 'to' max= integerLiteral )?
            	    {
            	    char_literal51=(Token)input.LT(1);
            	    match(input,49,FOLLOW_49_in_integerTypeConstraint814); 
            	    char_literal51_tree = (Object)adaptor.create(char_literal51);
            	    adaptor.addChild(root_0, char_literal51_tree);

            	    pushFollow(FOLLOW_integerLiteral_in_integerTypeConstraint818);
            	    min=integerLiteral();
            	    _fsp--;

            	    adaptor.addChild(root_0, min.getTree());
            	      range = new IDLPritiveTypeNumberRange<String>(); range.setMin("0"); range.setMax(input.toString(min.start,min.stop)); 
            	    // smartidl.g:229:126: ( 'to' max= integerLiteral )?
            	    int alt23=2;
            	    int LA23_0 = input.LA(1);

            	    if ( (LA23_0==48) ) {
            	        alt23=1;
            	    }
            	    switch (alt23) {
            	        case 1 :
            	            // smartidl.g:229:127: 'to' max= integerLiteral
            	            {
            	            string_literal52=(Token)input.LT(1);
            	            match(input,48,FOLLOW_48_in_integerTypeConstraint823); 
            	            string_literal52_tree = (Object)adaptor.create(string_literal52);
            	            adaptor.addChild(root_0, string_literal52_tree);

            	            pushFollow(FOLLOW_integerLiteral_in_integerTypeConstraint827);
            	            max=integerLiteral();
            	            _fsp--;

            	            adaptor.addChild(root_0, max.getTree());
            	             range.setMin( range.getMax() ); range.setMax(input.toString(max.start,max.stop)); 

            	            }
            	            break;

            	    }

            	     retval.ranges.add(range);

            	    }
            	    break;

            	default :
            	    break loop24;
                }
            } while (true);

            char_literal53=(Token)input.LT(1);
            match(input,31,FOLLOW_31_in_integerTypeConstraint839); 
            char_literal53_tree = (Object)adaptor.create(char_literal53);
            adaptor.addChild(root_0, char_literal53_tree);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end integerTypeConstraint

    public static class floatTypeConstraint_return extends ParserRuleReturnScope {
        public Collection < IDLPritiveTypeNumberRange<String> > ranges;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start floatTypeConstraint
    // smartidl.g:233:1: floatTypeConstraint returns [ Collection < IDLPritiveTypeNumberRange<String> > ranges ] : '(' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? ( ',' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? )* ')' ;
    public final floatTypeConstraint_return floatTypeConstraint() throws RecognitionException {
        floatTypeConstraint_return retval = new floatTypeConstraint_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token char_literal54=null;
        Token string_literal55=null;
        Token char_literal56=null;
        Token string_literal57=null;
        Token char_literal58=null;
        floatingPointLiteral_return min = null;

        floatingPointLiteral_return max = null;


        Object char_literal54_tree=null;
        Object string_literal55_tree=null;
        Object char_literal56_tree=null;
        Object string_literal57_tree=null;
        Object char_literal58_tree=null;


        	retval.ranges = new ArrayList< IDLPritiveTypeNumberRange<String> >() ;
        	IDLPritiveTypeNumberRange<String> range = new IDLPritiveTypeNumberRange<String>();

        try {
            // smartidl.g:238:2: ( '(' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? ( ',' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? )* ')' )
            // smartidl.g:238:4: '(' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? ( ',' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? )* ')'
            {
            root_0 = (Object)adaptor.nil();

            char_literal54=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_floatTypeConstraint860); 
            char_literal54_tree = (Object)adaptor.create(char_literal54);
            adaptor.addChild(root_0, char_literal54_tree);

            pushFollow(FOLLOW_floatingPointLiteral_in_floatTypeConstraint867);
            min=floatingPointLiteral();
            _fsp--;

            adaptor.addChild(root_0, min.getTree());
             range.setMin("0"); range.setMax(input.toString(min.start,min.stop)); 
            // smartidl.g:239:76: ( 'to' max= floatingPointLiteral )?
            int alt25=2;
            int LA25_0 = input.LA(1);

            if ( (LA25_0==48) ) {
                alt25=1;
            }
            switch (alt25) {
                case 1 :
                    // smartidl.g:239:77: 'to' max= floatingPointLiteral
                    {
                    string_literal55=(Token)input.LT(1);
                    match(input,48,FOLLOW_48_in_floatTypeConstraint872); 
                    string_literal55_tree = (Object)adaptor.create(string_literal55);
                    adaptor.addChild(root_0, string_literal55_tree);

                    pushFollow(FOLLOW_floatingPointLiteral_in_floatTypeConstraint876);
                    max=floatingPointLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, max.getTree());
                     range.setMin( range.getMax() ); range.setMax(input.toString(max.start,max.stop)); 

                    }
                    break;

            }

            retval.ranges.add(range);
            // smartidl.g:240:4: ( ',' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )? )*
            loop27:
            do {
                int alt27=2;
                int LA27_0 = input.LA(1);

                if ( (LA27_0==49) ) {
                    alt27=1;
                }


                switch (alt27) {
            	case 1 :
            	    // smartidl.g:240:5: ',' min= floatingPointLiteral ( 'to' max= floatingPointLiteral )?
            	    {
            	    char_literal56=(Token)input.LT(1);
            	    match(input,49,FOLLOW_49_in_floatTypeConstraint888); 
            	    char_literal56_tree = (Object)adaptor.create(char_literal56);
            	    adaptor.addChild(root_0, char_literal56_tree);

            	    pushFollow(FOLLOW_floatingPointLiteral_in_floatTypeConstraint892);
            	    min=floatingPointLiteral();
            	    _fsp--;

            	    adaptor.addChild(root_0, min.getTree());
            	      range = new IDLPritiveTypeNumberRange<String>(); range.setMin("0"); range.setMax(input.toString(min.start,min.stop)); 
            	    // smartidl.g:240:132: ( 'to' max= floatingPointLiteral )?
            	    int alt26=2;
            	    int LA26_0 = input.LA(1);

            	    if ( (LA26_0==48) ) {
            	        alt26=1;
            	    }
            	    switch (alt26) {
            	        case 1 :
            	            // smartidl.g:240:133: 'to' max= floatingPointLiteral
            	            {
            	            string_literal57=(Token)input.LT(1);
            	            match(input,48,FOLLOW_48_in_floatTypeConstraint897); 
            	            string_literal57_tree = (Object)adaptor.create(string_literal57);
            	            adaptor.addChild(root_0, string_literal57_tree);

            	            pushFollow(FOLLOW_floatingPointLiteral_in_floatTypeConstraint901);
            	            max=floatingPointLiteral();
            	            _fsp--;

            	            adaptor.addChild(root_0, max.getTree());
            	             range.setMin( range.getMax() ); range.setMax(input.toString(max.start,max.stop)); 

            	            }
            	            break;

            	    }

            	    retval.ranges.add(range);

            	    }
            	    break;

            	default :
            	    break loop27;
                }
            } while (true);

            char_literal58=(Token)input.LT(1);
            match(input,31,FOLLOW_31_in_floatTypeConstraint913); 
            char_literal58_tree = (Object)adaptor.create(char_literal58);
            adaptor.addChild(root_0, char_literal58_tree);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end floatTypeConstraint

    public static class stringSizeConstraint_return extends ParserRuleReturnScope {
        public IDLPritiveTypeNumberRange<Integer> range;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start stringSizeConstraint
    // smartidl.g:244:1: stringSizeConstraint returns [IDLPritiveTypeNumberRange<Integer> range] : '(' min= integerLiteral ( 'to' max= integerLiteral )? ')' ;
    public final stringSizeConstraint_return stringSizeConstraint() throws RecognitionException {
        stringSizeConstraint_return retval = new stringSizeConstraint_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token char_literal59=null;
        Token string_literal60=null;
        Token char_literal61=null;
        integerLiteral_return min = null;

        integerLiteral_return max = null;


        Object char_literal59_tree=null;
        Object string_literal60_tree=null;
        Object char_literal61_tree=null;


        	retval.range = new IDLPritiveTypeNumberRange<Integer>();

        try {
            // smartidl.g:248:2: ( '(' min= integerLiteral ( 'to' max= integerLiteral )? ')' )
            // smartidl.g:248:4: '(' min= integerLiteral ( 'to' max= integerLiteral )? ')'
            {
            root_0 = (Object)adaptor.nil();

            char_literal59=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_stringSizeConstraint933); 
            char_literal59_tree = (Object)adaptor.create(char_literal59);
            adaptor.addChild(root_0, char_literal59_tree);

            pushFollow(FOLLOW_integerLiteral_in_stringSizeConstraint937);
            min=integerLiteral();
            _fsp--;

            adaptor.addChild(root_0, min.getTree());
             retval.range.setMin(0); retval.range.setMax(Integer.valueOf(input.toString(min.start,min.stop))); 
            // smartidl.g:248:92: ( 'to' max= integerLiteral )?
            int alt28=2;
            int LA28_0 = input.LA(1);

            if ( (LA28_0==48) ) {
                alt28=1;
            }
            switch (alt28) {
                case 1 :
                    // smartidl.g:248:93: 'to' max= integerLiteral
                    {
                    string_literal60=(Token)input.LT(1);
                    match(input,48,FOLLOW_48_in_stringSizeConstraint942); 
                    string_literal60_tree = (Object)adaptor.create(string_literal60);
                    adaptor.addChild(root_0, string_literal60_tree);

                    pushFollow(FOLLOW_integerLiteral_in_stringSizeConstraint946);
                    max=integerLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, max.getTree());
                     retval.range.setMin(retval.range.getMax()); retval.range.setMax(Integer.valueOf(input.toString(max.start,max.stop))); 

                    }
                    break;

            }

            char_literal61=(Token)input.LT(1);
            match(input,31,FOLLOW_31_in_stringSizeConstraint953); 
            char_literal61_tree = (Object)adaptor.create(char_literal61);
            adaptor.addChild(root_0, char_literal61_tree);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end stringSizeConstraint

    public static class stringMaskConstraint_return extends ParserRuleReturnScope {
        public Collection< String > masks;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start stringMaskConstraint
    // smartidl.g:251:1: stringMaskConstraint returns [Collection< String > masks] : 'allowed' '(' mask= StringLiteral ( ',' mask= StringLiteral )* ')' ;
    public final stringMaskConstraint_return stringMaskConstraint() throws RecognitionException {
        stringMaskConstraint_return retval = new stringMaskConstraint_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token mask=null;
        Token string_literal62=null;
        Token char_literal63=null;
        Token char_literal64=null;
        Token char_literal65=null;

        Object mask_tree=null;
        Object string_literal62_tree=null;
        Object char_literal63_tree=null;
        Object char_literal64_tree=null;
        Object char_literal65_tree=null;


        	retval.masks = new ArrayList<String>();

        try {
            // smartidl.g:255:2: ( 'allowed' '(' mask= StringLiteral ( ',' mask= StringLiteral )* ')' )
            // smartidl.g:256:3: 'allowed' '(' mask= StringLiteral ( ',' mask= StringLiteral )* ')'
            {
            root_0 = (Object)adaptor.nil();

            string_literal62=(Token)input.LT(1);
            match(input,50,FOLLOW_50_in_stringMaskConstraint976); 
            string_literal62_tree = (Object)adaptor.create(string_literal62);
            adaptor.addChild(root_0, string_literal62_tree);

            char_literal63=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_stringMaskConstraint978); 
            char_literal63_tree = (Object)adaptor.create(char_literal63);
            adaptor.addChild(root_0, char_literal63_tree);

            mask=(Token)input.LT(1);
            match(input,StringLiteral,FOLLOW_StringLiteral_in_stringMaskConstraint982); 
            mask_tree = (Object)adaptor.create(mask);
            adaptor.addChild(root_0, mask_tree);

            retval.masks.add(mask.getText());
            // smartidl.g:256:62: ( ',' mask= StringLiteral )*
            loop29:
            do {
                int alt29=2;
                int LA29_0 = input.LA(1);

                if ( (LA29_0==49) ) {
                    alt29=1;
                }


                switch (alt29) {
            	case 1 :
            	    // smartidl.g:256:63: ',' mask= StringLiteral
            	    {
            	    char_literal64=(Token)input.LT(1);
            	    match(input,49,FOLLOW_49_in_stringMaskConstraint987); 
            	    char_literal64_tree = (Object)adaptor.create(char_literal64);
            	    adaptor.addChild(root_0, char_literal64_tree);

            	    mask=(Token)input.LT(1);
            	    match(input,StringLiteral,FOLLOW_StringLiteral_in_stringMaskConstraint991); 
            	    mask_tree = (Object)adaptor.create(mask);
            	    adaptor.addChild(root_0, mask_tree);

            	    retval.masks.add(mask.getText());

            	    }
            	    break;

            	default :
            	    break loop29;
                }
            } while (true);

            char_literal65=(Token)input.LT(1);
            match(input,31,FOLLOW_31_in_stringMaskConstraint997); 
            char_literal65_tree = (Object)adaptor.create(char_literal65);
            adaptor.addChild(root_0, char_literal65_tree);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end stringMaskConstraint

    public static class arrayDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start arrayDeclaration
    // smartidl.g:259:1: arrayDeclaration[IDLComplexType complexType] : 'array' '(' constraint= integerLiteral ')' 'of' itemDataType= datatypeDeclaration ;
    public final arrayDeclaration_return arrayDeclaration(IDLComplexType complexType) throws RecognitionException {
        arrayDeclaration_return retval = new arrayDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal66=null;
        Token char_literal67=null;
        Token char_literal68=null;
        Token string_literal69=null;
        integerLiteral_return constraint = null;

        datatypeDeclaration_return itemDataType = null;


        Object string_literal66_tree=null;
        Object char_literal67_tree=null;
        Object char_literal68_tree=null;
        Object string_literal69_tree=null;

        try {
            // smartidl.g:260:2: ( 'array' '(' constraint= integerLiteral ')' 'of' itemDataType= datatypeDeclaration )
            // smartidl.g:260:4: 'array' '(' constraint= integerLiteral ')' 'of' itemDataType= datatypeDeclaration
            {
            root_0 = (Object)adaptor.nil();

            string_literal66=(Token)input.LT(1);
            match(input,51,FOLLOW_51_in_arrayDeclaration1010); 
            string_literal66_tree = (Object)adaptor.create(string_literal66);
            adaptor.addChild(root_0, string_literal66_tree);

            char_literal67=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_arrayDeclaration1012); 
            char_literal67_tree = (Object)adaptor.create(char_literal67);
            adaptor.addChild(root_0, char_literal67_tree);

            pushFollow(FOLLOW_integerLiteral_in_arrayDeclaration1016);
            constraint=integerLiteral();
            _fsp--;

            adaptor.addChild(root_0, constraint.getTree());
            char_literal68=(Token)input.LT(1);
            match(input,31,FOLLOW_31_in_arrayDeclaration1018); 
            char_literal68_tree = (Object)adaptor.create(char_literal68);
            adaptor.addChild(root_0, char_literal68_tree);

            string_literal69=(Token)input.LT(1);
            match(input,52,FOLLOW_52_in_arrayDeclaration1020); 
            string_literal69_tree = (Object)adaptor.create(string_literal69);
            adaptor.addChild(root_0, string_literal69_tree);

            pushFollow(FOLLOW_datatypeDeclaration_in_arrayDeclaration1026);
            itemDataType=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, itemDataType.getTree());

            			complexType.setComplexTypeId ( IDLComplexType.ComplexTypeId.ARRAY );
            			complexType.setComplexTypeSizeConstraint ( Integer.valueOf(input.toString(constraint.start,constraint.stop)) );
            			complexType.setComplexItemDataType ( itemDataType.idlDataType );
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end arrayDeclaration

    public static class listDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start listDeclaration
    // smartidl.g:268:1: listDeclaration[IDLComplexType complexType] : 'list' ( '(' constraint= integerLiteral ')' )? 'of' itemDataType= datatypeDeclaration ;
    public final listDeclaration_return listDeclaration(IDLComplexType complexType) throws RecognitionException {
        listDeclaration_return retval = new listDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal70=null;
        Token char_literal71=null;
        Token char_literal72=null;
        Token string_literal73=null;
        integerLiteral_return constraint = null;

        datatypeDeclaration_return itemDataType = null;


        Object string_literal70_tree=null;
        Object char_literal71_tree=null;
        Object char_literal72_tree=null;
        Object string_literal73_tree=null;

        try {
            // smartidl.g:269:2: ( 'list' ( '(' constraint= integerLiteral ')' )? 'of' itemDataType= datatypeDeclaration )
            // smartidl.g:269:4: 'list' ( '(' constraint= integerLiteral ')' )? 'of' itemDataType= datatypeDeclaration
            {
            root_0 = (Object)adaptor.nil();

            string_literal70=(Token)input.LT(1);
            match(input,53,FOLLOW_53_in_listDeclaration1043); 
            string_literal70_tree = (Object)adaptor.create(string_literal70);
            adaptor.addChild(root_0, string_literal70_tree);

            // smartidl.g:269:11: ( '(' constraint= integerLiteral ')' )?
            int alt30=2;
            int LA30_0 = input.LA(1);

            if ( (LA30_0==30) ) {
                alt30=1;
            }
            switch (alt30) {
                case 1 :
                    // smartidl.g:269:12: '(' constraint= integerLiteral ')'
                    {
                    char_literal71=(Token)input.LT(1);
                    match(input,30,FOLLOW_30_in_listDeclaration1046); 
                    char_literal71_tree = (Object)adaptor.create(char_literal71);
                    adaptor.addChild(root_0, char_literal71_tree);

                    pushFollow(FOLLOW_integerLiteral_in_listDeclaration1050);
                    constraint=integerLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, constraint.getTree());
                    char_literal72=(Token)input.LT(1);
                    match(input,31,FOLLOW_31_in_listDeclaration1052); 
                    char_literal72_tree = (Object)adaptor.create(char_literal72);
                    adaptor.addChild(root_0, char_literal72_tree);


                    }
                    break;

            }

            string_literal73=(Token)input.LT(1);
            match(input,52,FOLLOW_52_in_listDeclaration1056); 
            string_literal73_tree = (Object)adaptor.create(string_literal73);
            adaptor.addChild(root_0, string_literal73_tree);

            pushFollow(FOLLOW_datatypeDeclaration_in_listDeclaration1062);
            itemDataType=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, itemDataType.getTree());

            			complexType.setComplexTypeId ( IDLComplexType.ComplexTypeId.LIST );
            			if (constraint != null)
            				complexType.setComplexTypeSizeConstraint ( Integer.valueOf(input.toString(constraint.start,constraint.stop)) );
            			complexType.setComplexItemDataType ( itemDataType.idlDataType );
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end listDeclaration

    public static class mapDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start mapDeclaration
    // smartidl.g:278:1: mapDeclaration[IDLComplexType complexType] : 'map' ( '(' constraint= integerLiteral ')' )? 'of' itemDataType= datatypeDeclaration 'by' keyType= primitiveType ;
    public final mapDeclaration_return mapDeclaration(IDLComplexType complexType) throws RecognitionException {
        mapDeclaration_return retval = new mapDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal74=null;
        Token char_literal75=null;
        Token char_literal76=null;
        Token string_literal77=null;
        Token string_literal78=null;
        integerLiteral_return constraint = null;

        datatypeDeclaration_return itemDataType = null;

        primitiveType_return keyType = null;


        Object string_literal74_tree=null;
        Object char_literal75_tree=null;
        Object char_literal76_tree=null;
        Object string_literal77_tree=null;
        Object string_literal78_tree=null;

        try {
            // smartidl.g:279:2: ( 'map' ( '(' constraint= integerLiteral ')' )? 'of' itemDataType= datatypeDeclaration 'by' keyType= primitiveType )
            // smartidl.g:279:4: 'map' ( '(' constraint= integerLiteral ')' )? 'of' itemDataType= datatypeDeclaration 'by' keyType= primitiveType
            {
            root_0 = (Object)adaptor.nil();

            string_literal74=(Token)input.LT(1);
            match(input,54,FOLLOW_54_in_mapDeclaration1079); 
            string_literal74_tree = (Object)adaptor.create(string_literal74);
            adaptor.addChild(root_0, string_literal74_tree);

            // smartidl.g:279:10: ( '(' constraint= integerLiteral ')' )?
            int alt31=2;
            int LA31_0 = input.LA(1);

            if ( (LA31_0==30) ) {
                alt31=1;
            }
            switch (alt31) {
                case 1 :
                    // smartidl.g:279:11: '(' constraint= integerLiteral ')'
                    {
                    char_literal75=(Token)input.LT(1);
                    match(input,30,FOLLOW_30_in_mapDeclaration1082); 
                    char_literal75_tree = (Object)adaptor.create(char_literal75);
                    adaptor.addChild(root_0, char_literal75_tree);

                    pushFollow(FOLLOW_integerLiteral_in_mapDeclaration1086);
                    constraint=integerLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, constraint.getTree());
                    char_literal76=(Token)input.LT(1);
                    match(input,31,FOLLOW_31_in_mapDeclaration1088); 
                    char_literal76_tree = (Object)adaptor.create(char_literal76);
                    adaptor.addChild(root_0, char_literal76_tree);


                    }
                    break;

            }

            string_literal77=(Token)input.LT(1);
            match(input,52,FOLLOW_52_in_mapDeclaration1092); 
            string_literal77_tree = (Object)adaptor.create(string_literal77);
            adaptor.addChild(root_0, string_literal77_tree);

            pushFollow(FOLLOW_datatypeDeclaration_in_mapDeclaration1098);
            itemDataType=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, itemDataType.getTree());
            string_literal78=(Token)input.LT(1);
            match(input,55,FOLLOW_55_in_mapDeclaration1100); 
            string_literal78_tree = (Object)adaptor.create(string_literal78);
            adaptor.addChild(root_0, string_literal78_tree);

            pushFollow(FOLLOW_primitiveType_in_mapDeclaration1106);
            keyType=primitiveType();
            _fsp--;

            adaptor.addChild(root_0, keyType.getTree());

            			complexType.setComplexTypeId ( IDLComplexType.ComplexTypeId.MAP );
            			if (constraint != null)
            				complexType.setComplexTypeSizeConstraint ( Integer.valueOf(input.toString(constraint.start,constraint.stop)) );
            			complexType.setComplexItemDataType ( itemDataType.idlDataType );
            			complexType.setComplexKeyDataType ( keyType.primitiveType );
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end mapDeclaration

    public static class enumDeclaration_return extends ParserRuleReturnScope {
        public IDLEnum idlEnum;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start enumDeclaration
    // smartidl.g:289:1: enumDeclaration returns [IDLEnum idlEnum] : 'enum' name= Identifier '{' enumItem[$idlEnum] ( ',' enumItem[$idlEnum] )* '}' ;
    public final enumDeclaration_return enumDeclaration() throws RecognitionException {
        enumDeclaration_return retval = new enumDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token string_literal79=null;
        Token char_literal80=null;
        Token char_literal82=null;
        Token char_literal84=null;
        enumItem_return enumItem81 = null;

        enumItem_return enumItem83 = null;


        Object name_tree=null;
        Object string_literal79_tree=null;
        Object char_literal80_tree=null;
        Object char_literal82_tree=null;
        Object char_literal84_tree=null;


        	retval.idlEnum = new IDLEnum();

        try {
            // smartidl.g:293:2: ( 'enum' name= Identifier '{' enumItem[$idlEnum] ( ',' enumItem[$idlEnum] )* '}' )
            // smartidl.g:293:4: 'enum' name= Identifier '{' enumItem[$idlEnum] ( ',' enumItem[$idlEnum] )* '}'
            {
            root_0 = (Object)adaptor.nil();

            string_literal79=(Token)input.LT(1);
            match(input,56,FOLLOW_56_in_enumDeclaration1130); 
            string_literal79_tree = (Object)adaptor.create(string_literal79);
            adaptor.addChild(root_0, string_literal79_tree);

            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_enumDeclaration1134); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

             retval.idlEnum.setName(name.getText()); 
            char_literal80=(Token)input.LT(1);
            match(input,57,FOLLOW_57_in_enumDeclaration1138); 
            char_literal80_tree = (Object)adaptor.create(char_literal80);
            adaptor.addChild(root_0, char_literal80_tree);

            pushFollow(FOLLOW_enumItem_in_enumDeclaration1140);
            enumItem81=enumItem(retval.idlEnum);
            _fsp--;

            adaptor.addChild(root_0, enumItem81.getTree());
            // smartidl.g:293:84: ( ',' enumItem[$idlEnum] )*
            loop32:
            do {
                int alt32=2;
                int LA32_0 = input.LA(1);

                if ( (LA32_0==49) ) {
                    alt32=1;
                }


                switch (alt32) {
            	case 1 :
            	    // smartidl.g:293:85: ',' enumItem[$idlEnum]
            	    {
            	    char_literal82=(Token)input.LT(1);
            	    match(input,49,FOLLOW_49_in_enumDeclaration1144); 
            	    char_literal82_tree = (Object)adaptor.create(char_literal82);
            	    adaptor.addChild(root_0, char_literal82_tree);

            	    pushFollow(FOLLOW_enumItem_in_enumDeclaration1146);
            	    enumItem83=enumItem(retval.idlEnum);
            	    _fsp--;

            	    adaptor.addChild(root_0, enumItem83.getTree());

            	    }
            	    break;

            	default :
            	    break loop32;
                }
            } while (true);

            char_literal84=(Token)input.LT(1);
            match(input,58,FOLLOW_58_in_enumDeclaration1151); 
            char_literal84_tree = (Object)adaptor.create(char_literal84);
            adaptor.addChild(root_0, char_literal84_tree);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end enumDeclaration

    public static class enumItem_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start enumItem
    // smartidl.g:296:1: enumItem[IDLEnum idlEnum] : enumItemName= Identifier ( '=' enumItemValueType= literal )? ;
    public final enumItem_return enumItem(IDLEnum idlEnum) throws RecognitionException {
        enumItem_return retval = new enumItem_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token enumItemName=null;
        Token char_literal85=null;
        literal_return enumItemValueType = null;


        Object enumItemName_tree=null;
        Object char_literal85_tree=null;

        try {
            // smartidl.g:297:2: (enumItemName= Identifier ( '=' enumItemValueType= literal )? )
            // smartidl.g:297:4: enumItemName= Identifier ( '=' enumItemValueType= literal )?
            {
            root_0 = (Object)adaptor.nil();

            enumItemName=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_enumItem1167); 
            enumItemName_tree = (Object)adaptor.create(enumItemName);
            adaptor.addChild(root_0, enumItemName_tree);

            // smartidl.g:297:28: ( '=' enumItemValueType= literal )?
            int alt33=2;
            int LA33_0 = input.LA(1);

            if ( (LA33_0==42) ) {
                alt33=1;
            }
            switch (alt33) {
                case 1 :
                    // smartidl.g:297:29: '=' enumItemValueType= literal
                    {
                    char_literal85=(Token)input.LT(1);
                    match(input,42,FOLLOW_42_in_enumItem1170); 
                    char_literal85_tree = (Object)adaptor.create(char_literal85);
                    adaptor.addChild(root_0, char_literal85_tree);

                    pushFollow(FOLLOW_literal_in_enumItem1174);
                    enumItemValueType=literal();
                    _fsp--;

                    adaptor.addChild(root_0, enumItemValueType.getTree());

                    }
                    break;

            }


            		CollectionPair <String, Object> pair = new CollectionPair<String, Object> ();
            		pair.setFirst ( enumItemName.getText() ); 
            		if(enumItemValueType!=null) {
            			pair.setSecond ( input.toString(enumItemValueType.start,enumItemValueType.stop) );
            			idlEnum.setItemDataTypeId ( enumItemValueType.typeId );
            		}
            		else
            			idlEnum.setNoUserValues( true );
            		idlEnum.getItems().add ( pair );
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end enumItem

    public static class structureDeclaration_return extends ParserRuleReturnScope {
        public IDLStructure idlStructure;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start structureDeclaration
    // smartidl.g:311:1: structureDeclaration returns [IDLStructure idlStructure] : 'structure' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( structureItem[$idlStructure] )* '}' ;
    public final structureDeclaration_return structureDeclaration() throws RecognitionException {
        structureDeclaration_return retval = new structureDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token string_literal86=null;
        Token string_literal87=null;
        Token char_literal88=null;
        Token char_literal90=null;
        qualifiedNameList_return parents = null;

        structureItem_return structureItem89 = null;


        Object name_tree=null;
        Object string_literal86_tree=null;
        Object string_literal87_tree=null;
        Object char_literal88_tree=null;
        Object char_literal90_tree=null;


        	retval.idlStructure = new IDLStructure();

        try {
            // smartidl.g:315:2: ( 'structure' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( structureItem[$idlStructure] )* '}' )
            // smartidl.g:315:4: 'structure' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( structureItem[$idlStructure] )* '}'
            {
            root_0 = (Object)adaptor.nil();

            string_literal86=(Token)input.LT(1);
            match(input,59,FOLLOW_59_in_structureDeclaration1199); 
            string_literal86_tree = (Object)adaptor.create(string_literal86);
            adaptor.addChild(root_0, string_literal86_tree);

            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_structureDeclaration1203); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:315:32: ( 'extends' parents= qualifiedNameList )?
            int alt34=2;
            int LA34_0 = input.LA(1);

            if ( (LA34_0==60) ) {
                alt34=1;
            }
            switch (alt34) {
                case 1 :
                    // smartidl.g:315:33: 'extends' parents= qualifiedNameList
                    {
                    string_literal87=(Token)input.LT(1);
                    match(input,60,FOLLOW_60_in_structureDeclaration1206); 
                    string_literal87_tree = (Object)adaptor.create(string_literal87);
                    adaptor.addChild(root_0, string_literal87_tree);

                    pushFollow(FOLLOW_qualifiedNameList_in_structureDeclaration1210);
                    parents=qualifiedNameList();
                    _fsp--;

                    adaptor.addChild(root_0, parents.getTree());

                    }
                    break;

            }

            char_literal88=(Token)input.LT(1);
            match(input,57,FOLLOW_57_in_structureDeclaration1214); 
            char_literal88_tree = (Object)adaptor.create(char_literal88);
            adaptor.addChild(root_0, char_literal88_tree);

            // smartidl.g:315:75: ( structureItem[$idlStructure] )*
            loop35:
            do {
                int alt35=2;
                int LA35_0 = input.LA(1);

                if ( (LA35_0==Identifier||(LA35_0>=28 && LA35_0<=30)||(LA35_0>=32 && LA35_0<=40)||(LA35_0>=43 && LA35_0<=47)||LA35_0==51||(LA35_0>=53 && LA35_0<=54)) ) {
                    alt35=1;
                }


                switch (alt35) {
            	case 1 :
            	    // smartidl.g:315:76: structureItem[$idlStructure]
            	    {
            	    pushFollow(FOLLOW_structureItem_in_structureDeclaration1217);
            	    structureItem89=structureItem(retval.idlStructure);
            	    _fsp--;

            	    adaptor.addChild(root_0, structureItem89.getTree());

            	    }
            	    break;

            	default :
            	    break loop35;
                }
            } while (true);

            char_literal90=(Token)input.LT(1);
            match(input,58,FOLLOW_58_in_structureDeclaration1222); 
            char_literal90_tree = (Object)adaptor.create(char_literal90);
            adaptor.addChild(root_0, char_literal90_tree);


            		retval.idlStructure.setName ( name.getText() );
            		if (parents != null)
            			retval.idlStructure.setParentsLinks ( parents.nameList ); 
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end structureDeclaration

    public static class structureItem_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start structureItem
    // smartidl.g:323:1: structureItem[IDLStructure idlStructure] : type= datatypeDeclaration name= Identifier ( '=' value= literal )? ';' ;
    public final structureItem_return structureItem(IDLStructure idlStructure) throws RecognitionException {
        structureItem_return retval = new structureItem_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token char_literal91=null;
        Token char_literal92=null;
        datatypeDeclaration_return type = null;

        literal_return value = null;


        Object name_tree=null;
        Object char_literal91_tree=null;
        Object char_literal92_tree=null;

        try {
            // smartidl.g:324:2: (type= datatypeDeclaration name= Identifier ( '=' value= literal )? ';' )
            // smartidl.g:324:4: type= datatypeDeclaration name= Identifier ( '=' value= literal )? ';'
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_datatypeDeclaration_in_structureItem1241);
            type=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, type.getTree());
            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_structureItem1245); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:324:45: ( '=' value= literal )?
            int alt36=2;
            int LA36_0 = input.LA(1);

            if ( (LA36_0==42) ) {
                alt36=1;
            }
            switch (alt36) {
                case 1 :
                    // smartidl.g:324:46: '=' value= literal
                    {
                    char_literal91=(Token)input.LT(1);
                    match(input,42,FOLLOW_42_in_structureItem1248); 
                    char_literal91_tree = (Object)adaptor.create(char_literal91);
                    adaptor.addChild(root_0, char_literal91_tree);

                    pushFollow(FOLLOW_literal_in_structureItem1252);
                    value=literal();
                    _fsp--;

                    adaptor.addChild(root_0, value.getTree());

                    }
                    break;

            }

            char_literal92=(Token)input.LT(1);
            match(input,24,FOLLOW_24_in_structureItem1256); 
            char_literal92_tree = (Object)adaptor.create(char_literal92);
            adaptor.addChild(root_0, char_literal92_tree);


            		IDLStructureItem item = new IDLStructureItem();
            		item.setName ( name.getText() );
            		item.setType ( type.idlDataType );
            		if ( value != null) {
            			item.setValue ( input.toString(value.start,value.stop) );
            		}
            		item.setDeclaredStructure ( idlStructure );
            		idlStructure.getItems().add ( item );		
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end structureItem

    public static class exceptionDeclaration_return extends ParserRuleReturnScope {
        public IDLException idlException;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start exceptionDeclaration
    // smartidl.g:337:1: exceptionDeclaration returns [IDLException idlException] : 'exception' name= Identifier ( 'extends' parent= qualifiedName )? '{' ( exceptionItem[$idlException] )* '}' ;
    public final exceptionDeclaration_return exceptionDeclaration() throws RecognitionException {
        exceptionDeclaration_return retval = new exceptionDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token string_literal93=null;
        Token string_literal94=null;
        Token char_literal95=null;
        Token char_literal97=null;
        qualifiedName_return parent = null;

        exceptionItem_return exceptionItem96 = null;


        Object name_tree=null;
        Object string_literal93_tree=null;
        Object string_literal94_tree=null;
        Object char_literal95_tree=null;
        Object char_literal97_tree=null;


        	retval.idlException = new IDLException();

        try {
            // smartidl.g:341:2: ( 'exception' name= Identifier ( 'extends' parent= qualifiedName )? '{' ( exceptionItem[$idlException] )* '}' )
            // smartidl.g:341:4: 'exception' name= Identifier ( 'extends' parent= qualifiedName )? '{' ( exceptionItem[$idlException] )* '}'
            {
            root_0 = (Object)adaptor.nil();

            string_literal93=(Token)input.LT(1);
            match(input,61,FOLLOW_61_in_exceptionDeclaration1280); 
            string_literal93_tree = (Object)adaptor.create(string_literal93);
            adaptor.addChild(root_0, string_literal93_tree);

            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_exceptionDeclaration1284); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:341:32: ( 'extends' parent= qualifiedName )?
            int alt37=2;
            int LA37_0 = input.LA(1);

            if ( (LA37_0==60) ) {
                alt37=1;
            }
            switch (alt37) {
                case 1 :
                    // smartidl.g:341:33: 'extends' parent= qualifiedName
                    {
                    string_literal94=(Token)input.LT(1);
                    match(input,60,FOLLOW_60_in_exceptionDeclaration1287); 
                    string_literal94_tree = (Object)adaptor.create(string_literal94);
                    adaptor.addChild(root_0, string_literal94_tree);

                    pushFollow(FOLLOW_qualifiedName_in_exceptionDeclaration1291);
                    parent=qualifiedName();
                    _fsp--;

                    adaptor.addChild(root_0, parent.getTree());

                    }
                    break;

            }

            char_literal95=(Token)input.LT(1);
            match(input,57,FOLLOW_57_in_exceptionDeclaration1295); 
            char_literal95_tree = (Object)adaptor.create(char_literal95);
            adaptor.addChild(root_0, char_literal95_tree);

            // smartidl.g:341:70: ( exceptionItem[$idlException] )*
            loop38:
            do {
                int alt38=2;
                int LA38_0 = input.LA(1);

                if ( (LA38_0==Identifier||(LA38_0>=28 && LA38_0<=30)||(LA38_0>=32 && LA38_0<=40)||(LA38_0>=43 && LA38_0<=47)||LA38_0==51||(LA38_0>=53 && LA38_0<=54)) ) {
                    alt38=1;
                }


                switch (alt38) {
            	case 1 :
            	    // smartidl.g:341:71: exceptionItem[$idlException]
            	    {
            	    pushFollow(FOLLOW_exceptionItem_in_exceptionDeclaration1298);
            	    exceptionItem96=exceptionItem(retval.idlException);
            	    _fsp--;

            	    adaptor.addChild(root_0, exceptionItem96.getTree());

            	    }
            	    break;

            	default :
            	    break loop38;
                }
            } while (true);

            char_literal97=(Token)input.LT(1);
            match(input,58,FOLLOW_58_in_exceptionDeclaration1303); 
            char_literal97_tree = (Object)adaptor.create(char_literal97);
            adaptor.addChild(root_0, char_literal97_tree);


            		retval.idlException.setName ( name.getText() );
            		if (parent != null)
            			retval.idlException.setParentLink ( input.toString(parent.start,parent.stop) ); 
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end exceptionDeclaration

    public static class exceptionItem_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start exceptionItem
    // smartidl.g:349:1: exceptionItem[IDLException idlException] : type= datatypeDeclaration name= Identifier ( '=' value= literal )? ';' ;
    public final exceptionItem_return exceptionItem(IDLException idlException) throws RecognitionException {
        exceptionItem_return retval = new exceptionItem_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token char_literal98=null;
        Token char_literal99=null;
        datatypeDeclaration_return type = null;

        literal_return value = null;


        Object name_tree=null;
        Object char_literal98_tree=null;
        Object char_literal99_tree=null;

        try {
            // smartidl.g:350:2: (type= datatypeDeclaration name= Identifier ( '=' value= literal )? ';' )
            // smartidl.g:350:4: type= datatypeDeclaration name= Identifier ( '=' value= literal )? ';'
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_datatypeDeclaration_in_exceptionItem1322);
            type=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, type.getTree());
            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_exceptionItem1326); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:350:45: ( '=' value= literal )?
            int alt39=2;
            int LA39_0 = input.LA(1);

            if ( (LA39_0==42) ) {
                alt39=1;
            }
            switch (alt39) {
                case 1 :
                    // smartidl.g:350:46: '=' value= literal
                    {
                    char_literal98=(Token)input.LT(1);
                    match(input,42,FOLLOW_42_in_exceptionItem1329); 
                    char_literal98_tree = (Object)adaptor.create(char_literal98);
                    adaptor.addChild(root_0, char_literal98_tree);

                    pushFollow(FOLLOW_literal_in_exceptionItem1333);
                    value=literal();
                    _fsp--;

                    adaptor.addChild(root_0, value.getTree());

                    }
                    break;

            }

            char_literal99=(Token)input.LT(1);
            match(input,24,FOLLOW_24_in_exceptionItem1337); 
            char_literal99_tree = (Object)adaptor.create(char_literal99);
            adaptor.addChild(root_0, char_literal99_tree);


            		IDLExceptionItem item = new IDLExceptionItem();
            		item.setName ( name.getText() );
            		item.setType ( type.idlDataType );
            		if ( value != null) {
            			item.setValue ( input.toString(value.start,value.stop) );
            		}
            		item.setDeclaredException ( idlException );
            		idlException.getItems().add ( item );
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end exceptionItem

    public static class choiceDeclaration_return extends ParserRuleReturnScope {
        public IDLChoice idlChoice;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start choiceDeclaration
    // smartidl.g:363:1: choiceDeclaration returns [IDLChoice idlChoice] : 'choice' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( choiceItem[$idlChoice] )* '}' ;
    public final choiceDeclaration_return choiceDeclaration() throws RecognitionException {
        choiceDeclaration_return retval = new choiceDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token string_literal100=null;
        Token string_literal101=null;
        Token char_literal102=null;
        Token char_literal104=null;
        qualifiedNameList_return parents = null;

        choiceItem_return choiceItem103 = null;


        Object name_tree=null;
        Object string_literal100_tree=null;
        Object string_literal101_tree=null;
        Object char_literal102_tree=null;
        Object char_literal104_tree=null;


        	retval.idlChoice = new IDLChoice();

        try {
            // smartidl.g:367:2: ( 'choice' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( choiceItem[$idlChoice] )* '}' )
            // smartidl.g:367:4: 'choice' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( choiceItem[$idlChoice] )* '}'
            {
            root_0 = (Object)adaptor.nil();

            string_literal100=(Token)input.LT(1);
            match(input,62,FOLLOW_62_in_choiceDeclaration1360); 
            string_literal100_tree = (Object)adaptor.create(string_literal100);
            adaptor.addChild(root_0, string_literal100_tree);

            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_choiceDeclaration1364); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:367:29: ( 'extends' parents= qualifiedNameList )?
            int alt40=2;
            int LA40_0 = input.LA(1);

            if ( (LA40_0==60) ) {
                alt40=1;
            }
            switch (alt40) {
                case 1 :
                    // smartidl.g:367:30: 'extends' parents= qualifiedNameList
                    {
                    string_literal101=(Token)input.LT(1);
                    match(input,60,FOLLOW_60_in_choiceDeclaration1367); 
                    string_literal101_tree = (Object)adaptor.create(string_literal101);
                    adaptor.addChild(root_0, string_literal101_tree);

                    pushFollow(FOLLOW_qualifiedNameList_in_choiceDeclaration1371);
                    parents=qualifiedNameList();
                    _fsp--;

                    adaptor.addChild(root_0, parents.getTree());

                    }
                    break;

            }

            char_literal102=(Token)input.LT(1);
            match(input,57,FOLLOW_57_in_choiceDeclaration1375); 
            char_literal102_tree = (Object)adaptor.create(char_literal102);
            adaptor.addChild(root_0, char_literal102_tree);

            // smartidl.g:367:72: ( choiceItem[$idlChoice] )*
            loop41:
            do {
                int alt41=2;
                int LA41_0 = input.LA(1);

                if ( (LA41_0==Identifier||(LA41_0>=28 && LA41_0<=30)||(LA41_0>=32 && LA41_0<=40)||(LA41_0>=43 && LA41_0<=47)||LA41_0==51||(LA41_0>=53 && LA41_0<=54)) ) {
                    alt41=1;
                }


                switch (alt41) {
            	case 1 :
            	    // smartidl.g:367:73: choiceItem[$idlChoice]
            	    {
            	    pushFollow(FOLLOW_choiceItem_in_choiceDeclaration1378);
            	    choiceItem103=choiceItem(retval.idlChoice);
            	    _fsp--;

            	    adaptor.addChild(root_0, choiceItem103.getTree());

            	    }
            	    break;

            	default :
            	    break loop41;
                }
            } while (true);

            char_literal104=(Token)input.LT(1);
            match(input,58,FOLLOW_58_in_choiceDeclaration1383); 
            char_literal104_tree = (Object)adaptor.create(char_literal104);
            adaptor.addChild(root_0, char_literal104_tree);


            		retval.idlChoice.setName ( name.getText() );
            		if (parents != null)
            			retval.idlChoice.setParentsLinks ( parents.nameList );
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end choiceDeclaration

    public static class choiceItem_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start choiceItem
    // smartidl.g:375:1: choiceItem[IDLChoice idlChoice] : type= datatypeDeclaration name= Identifier ';' ;
    public final choiceItem_return choiceItem(IDLChoice idlChoice) throws RecognitionException {
        choiceItem_return retval = new choiceItem_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token char_literal105=null;
        datatypeDeclaration_return type = null;


        Object name_tree=null;
        Object char_literal105_tree=null;

        try {
            // smartidl.g:376:2: (type= datatypeDeclaration name= Identifier ';' )
            // smartidl.g:376:4: type= datatypeDeclaration name= Identifier ';'
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_datatypeDeclaration_in_choiceItem1402);
            type=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, type.getTree());
            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_choiceItem1406); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            char_literal105=(Token)input.LT(1);
            match(input,24,FOLLOW_24_in_choiceItem1408); 
            char_literal105_tree = (Object)adaptor.create(char_literal105);
            adaptor.addChild(root_0, char_literal105_tree);


            		IDLChoiceItem item = new IDLChoiceItem();
            		item.setName ( name.getText() );
            		item.setType ( type.idlDataType);
            		idlChoice.getItems().add ( item );
            	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end choiceItem

    public static class interfaceDeclaration_return extends ParserRuleReturnScope {
        public IDLInterface idlInterface;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start interfaceDeclaration
    // smartidl.g:385:1: interfaceDeclaration returns [IDLInterface idlInterface] : 'interface' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( interfaceOperation[$idlInterface] )* '}' ;
    public final interfaceDeclaration_return interfaceDeclaration() throws RecognitionException {
        interfaceDeclaration_return retval = new interfaceDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token string_literal106=null;
        Token string_literal107=null;
        Token char_literal108=null;
        Token char_literal110=null;
        qualifiedNameList_return parents = null;

        interfaceOperation_return interfaceOperation109 = null;


        Object name_tree=null;
        Object string_literal106_tree=null;
        Object string_literal107_tree=null;
        Object char_literal108_tree=null;
        Object char_literal110_tree=null;


        	retval.idlInterface = new IDLInterface();

        try {
            // smartidl.g:389:2: ( 'interface' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( interfaceOperation[$idlInterface] )* '}' )
            // smartidl.g:389:4: 'interface' name= Identifier ( 'extends' parents= qualifiedNameList )? '{' ( interfaceOperation[$idlInterface] )* '}'
            {
            root_0 = (Object)adaptor.nil();

            string_literal106=(Token)input.LT(1);
            match(input,63,FOLLOW_63_in_interfaceDeclaration1432); 
            string_literal106_tree = (Object)adaptor.create(string_literal106);
            adaptor.addChild(root_0, string_literal106_tree);

            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_interfaceDeclaration1436); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:389:32: ( 'extends' parents= qualifiedNameList )?
            int alt42=2;
            int LA42_0 = input.LA(1);

            if ( (LA42_0==60) ) {
                alt42=1;
            }
            switch (alt42) {
                case 1 :
                    // smartidl.g:389:33: 'extends' parents= qualifiedNameList
                    {
                    string_literal107=(Token)input.LT(1);
                    match(input,60,FOLLOW_60_in_interfaceDeclaration1439); 
                    string_literal107_tree = (Object)adaptor.create(string_literal107);
                    adaptor.addChild(root_0, string_literal107_tree);

                    pushFollow(FOLLOW_qualifiedNameList_in_interfaceDeclaration1443);
                    parents=qualifiedNameList();
                    _fsp--;

                    adaptor.addChild(root_0, parents.getTree());

                    }
                    break;

            }

            char_literal108=(Token)input.LT(1);
            match(input,57,FOLLOW_57_in_interfaceDeclaration1448); 
            char_literal108_tree = (Object)adaptor.create(char_literal108);
            adaptor.addChild(root_0, char_literal108_tree);

            // smartidl.g:389:76: ( interfaceOperation[$idlInterface] )*
            loop43:
            do {
                int alt43=2;
                int LA43_0 = input.LA(1);

                if ( (LA43_0==Identifier||(LA43_0>=28 && LA43_0<=30)||(LA43_0>=32 && LA43_0<=40)||(LA43_0>=43 && LA43_0<=47)||LA43_0==51||(LA43_0>=53 && LA43_0<=54)||LA43_0==65) ) {
                    alt43=1;
                }


                switch (alt43) {
            	case 1 :
            	    // smartidl.g:389:77: interfaceOperation[$idlInterface]
            	    {
            	    pushFollow(FOLLOW_interfaceOperation_in_interfaceDeclaration1451);
            	    interfaceOperation109=interfaceOperation(retval.idlInterface);
            	    _fsp--;

            	    adaptor.addChild(root_0, interfaceOperation109.getTree());

            	    }
            	    break;

            	default :
            	    break loop43;
                }
            } while (true);

            char_literal110=(Token)input.LT(1);
            match(input,58,FOLLOW_58_in_interfaceDeclaration1456); 
            char_literal110_tree = (Object)adaptor.create(char_literal110);
            adaptor.addChild(root_0, char_literal110_tree);


            			retval.idlInterface.setName ( name.getText() );
            			if (parents != null)
            				retval.idlInterface.setParentsLinks ( parents.nameList );	
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end interfaceDeclaration

    public static class interfaceOperation_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start interfaceOperation
    // smartidl.g:397:1: interfaceOperation[IDLInterface idlInterface] : interfaceOperationResult[idlOperation] name= Identifier '(' ( interfaceOperationParam[idlOperation] )? ( ',' interfaceOperationParam[idlOperation] )* ')' ( operationThrowsDeclaration[idlOperation] )? ';' ;
    public final interfaceOperation_return interfaceOperation(IDLInterface idlInterface) throws RecognitionException {
        interfaceOperation_return retval = new interfaceOperation_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token char_literal112=null;
        Token char_literal114=null;
        Token char_literal116=null;
        Token char_literal118=null;
        interfaceOperationResult_return interfaceOperationResult111 = null;

        interfaceOperationParam_return interfaceOperationParam113 = null;

        interfaceOperationParam_return interfaceOperationParam115 = null;

        operationThrowsDeclaration_return operationThrowsDeclaration117 = null;


        Object name_tree=null;
        Object char_literal112_tree=null;
        Object char_literal114_tree=null;
        Object char_literal116_tree=null;
        Object char_literal118_tree=null;


        	IDLInterfaceOperation idlOperation = new IDLInterfaceOperation(); 

        try {
            // smartidl.g:401:2: ( interfaceOperationResult[idlOperation] name= Identifier '(' ( interfaceOperationParam[idlOperation] )? ( ',' interfaceOperationParam[idlOperation] )* ')' ( operationThrowsDeclaration[idlOperation] )? ';' )
            // smartidl.g:401:4: interfaceOperationResult[idlOperation] name= Identifier '(' ( interfaceOperationParam[idlOperation] )? ( ',' interfaceOperationParam[idlOperation] )* ')' ( operationThrowsDeclaration[idlOperation] )? ';'
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_interfaceOperationResult_in_interfaceOperation1478);
            interfaceOperationResult111=interfaceOperationResult(idlOperation);
            _fsp--;

            adaptor.addChild(root_0, interfaceOperationResult111.getTree());
            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_interfaceOperation1483); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            char_literal112=(Token)input.LT(1);
            match(input,30,FOLLOW_30_in_interfaceOperation1485); 
            char_literal112_tree = (Object)adaptor.create(char_literal112);
            adaptor.addChild(root_0, char_literal112_tree);

            // smartidl.g:401:63: ( interfaceOperationParam[idlOperation] )?
            int alt44=2;
            int LA44_0 = input.LA(1);

            if ( (LA44_0==Identifier||(LA44_0>=28 && LA44_0<=30)||(LA44_0>=32 && LA44_0<=40)||(LA44_0>=43 && LA44_0<=47)||LA44_0==51||(LA44_0>=53 && LA44_0<=54)) ) {
                alt44=1;
            }
            switch (alt44) {
                case 1 :
                    // smartidl.g:401:64: interfaceOperationParam[idlOperation]
                    {
                    pushFollow(FOLLOW_interfaceOperationParam_in_interfaceOperation1488);
                    interfaceOperationParam113=interfaceOperationParam(idlOperation);
                    _fsp--;

                    adaptor.addChild(root_0, interfaceOperationParam113.getTree());

                    }
                    break;

            }

            // smartidl.g:401:104: ( ',' interfaceOperationParam[idlOperation] )*
            loop45:
            do {
                int alt45=2;
                int LA45_0 = input.LA(1);

                if ( (LA45_0==49) ) {
                    alt45=1;
                }


                switch (alt45) {
            	case 1 :
            	    // smartidl.g:401:105: ',' interfaceOperationParam[idlOperation]
            	    {
            	    char_literal114=(Token)input.LT(1);
            	    match(input,49,FOLLOW_49_in_interfaceOperation1494); 
            	    char_literal114_tree = (Object)adaptor.create(char_literal114);
            	    adaptor.addChild(root_0, char_literal114_tree);

            	    pushFollow(FOLLOW_interfaceOperationParam_in_interfaceOperation1496);
            	    interfaceOperationParam115=interfaceOperationParam(idlOperation);
            	    _fsp--;

            	    adaptor.addChild(root_0, interfaceOperationParam115.getTree());

            	    }
            	    break;

            	default :
            	    break loop45;
                }
            } while (true);

            char_literal116=(Token)input.LT(1);
            match(input,31,FOLLOW_31_in_interfaceOperation1501); 
            char_literal116_tree = (Object)adaptor.create(char_literal116);
            adaptor.addChild(root_0, char_literal116_tree);

            // smartidl.g:401:153: ( operationThrowsDeclaration[idlOperation] )?
            int alt46=2;
            int LA46_0 = input.LA(1);

            if ( (LA46_0==66) ) {
                alt46=1;
            }
            switch (alt46) {
                case 1 :
                    // smartidl.g:401:154: operationThrowsDeclaration[idlOperation]
                    {
                    pushFollow(FOLLOW_operationThrowsDeclaration_in_interfaceOperation1504);
                    operationThrowsDeclaration117=operationThrowsDeclaration(idlOperation);
                    _fsp--;

                    adaptor.addChild(root_0, operationThrowsDeclaration117.getTree());

                    }
                    break;

            }

            char_literal118=(Token)input.LT(1);
            match(input,24,FOLLOW_24_in_interfaceOperation1510); 
            char_literal118_tree = (Object)adaptor.create(char_literal118);
            adaptor.addChild(root_0, char_literal118_tree);


            			idlOperation.setName ( name.getText() );
            			idlOperation.setDeclaredInInterface ( idlInterface );
            			idlInterface.getOperations().add ( idlOperation );			
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end interfaceOperation

    public static class interfaceOperationResult_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start interfaceOperationResult
    // smartidl.g:409:1: interfaceOperationResult[IDLInterfaceOperation idlOperation] : ( (type= datatypeDeclaration (isSessionId= 'as' 'sessionid' )? ) | 'void' );
    public final interfaceOperationResult_return interfaceOperationResult(IDLInterfaceOperation idlOperation) throws RecognitionException {
        interfaceOperationResult_return retval = new interfaceOperationResult_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token isSessionId=null;
        Token string_literal119=null;
        Token string_literal120=null;
        datatypeDeclaration_return type = null;


        Object isSessionId_tree=null;
        Object string_literal119_tree=null;
        Object string_literal120_tree=null;

        try {
            // smartidl.g:410:2: ( (type= datatypeDeclaration (isSessionId= 'as' 'sessionid' )? ) | 'void' )
            int alt48=2;
            int LA48_0 = input.LA(1);

            if ( (LA48_0==Identifier||(LA48_0>=28 && LA48_0<=30)||(LA48_0>=32 && LA48_0<=40)||(LA48_0>=43 && LA48_0<=47)||LA48_0==51||(LA48_0>=53 && LA48_0<=54)) ) {
                alt48=1;
            }
            else if ( (LA48_0==65) ) {
                alt48=2;
            }
            else {
                NoViableAltException nvae =
                    new NoViableAltException("409:1: interfaceOperationResult[IDLInterfaceOperation idlOperation] : ( (type= datatypeDeclaration (isSessionId= 'as' 'sessionid' )? ) | 'void' );", 48, 0, input);

                throw nvae;
            }
            switch (alt48) {
                case 1 :
                    // smartidl.g:410:4: (type= datatypeDeclaration (isSessionId= 'as' 'sessionid' )? )
                    {
                    root_0 = (Object)adaptor.nil();

                    // smartidl.g:410:4: (type= datatypeDeclaration (isSessionId= 'as' 'sessionid' )? )
                    // smartidl.g:410:5: type= datatypeDeclaration (isSessionId= 'as' 'sessionid' )?
                    {
                    pushFollow(FOLLOW_datatypeDeclaration_in_interfaceOperationResult1531);
                    type=datatypeDeclaration();
                    _fsp--;

                    adaptor.addChild(root_0, type.getTree());
                    // smartidl.g:410:30: (isSessionId= 'as' 'sessionid' )?
                    int alt47=2;
                    int LA47_0 = input.LA(1);

                    if ( (LA47_0==27) ) {
                        alt47=1;
                    }
                    switch (alt47) {
                        case 1 :
                            // smartidl.g:410:31: isSessionId= 'as' 'sessionid'
                            {
                            isSessionId=(Token)input.LT(1);
                            match(input,27,FOLLOW_27_in_interfaceOperationResult1536); 
                            isSessionId_tree = (Object)adaptor.create(isSessionId);
                            adaptor.addChild(root_0, isSessionId_tree);

                            string_literal119=(Token)input.LT(1);
                            match(input,64,FOLLOW_64_in_interfaceOperationResult1538); 
                            string_literal119_tree = (Object)adaptor.create(string_literal119);
                            adaptor.addChild(root_0, string_literal119_tree);


                            }
                            break;

                    }


                    				idlOperation.setResultType (type.idlDataType);
                    				if (isSessionId!=null)
                    					idlOperation.setResultSessionId ( true );				
                    			

                    }


                    }
                    break;
                case 2 :
                    // smartidl.g:417:5: 'void'
                    {
                    root_0 = (Object)adaptor.nil();

                    string_literal120=(Token)input.LT(1);
                    match(input,65,FOLLOW_65_in_interfaceOperationResult1555); 
                    string_literal120_tree = (Object)adaptor.create(string_literal120);
                    adaptor.addChild(root_0, string_literal120_tree);


                    }
                    break;

            }
            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end interfaceOperationResult

    public static class interfaceOperationParam_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start interfaceOperationParam
    // smartidl.g:420:1: interfaceOperationParam[IDLInterfaceOperation idlOperation] : type= datatypeDeclaration name= Identifier ( '=' value= literal )? (isSessionId= 'as' 'sessionid' )? ;
    public final interfaceOperationParam_return interfaceOperationParam(IDLInterfaceOperation idlOperation) throws RecognitionException {
        interfaceOperationParam_return retval = new interfaceOperationParam_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token name=null;
        Token isSessionId=null;
        Token char_literal121=null;
        Token string_literal122=null;
        datatypeDeclaration_return type = null;

        literal_return value = null;


        Object name_tree=null;
        Object isSessionId_tree=null;
        Object char_literal121_tree=null;
        Object string_literal122_tree=null;

        try {
            // smartidl.g:421:2: (type= datatypeDeclaration name= Identifier ( '=' value= literal )? (isSessionId= 'as' 'sessionid' )? )
            // smartidl.g:421:4: type= datatypeDeclaration name= Identifier ( '=' value= literal )? (isSessionId= 'as' 'sessionid' )?
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_datatypeDeclaration_in_interfaceOperationParam1571);
            type=datatypeDeclaration();
            _fsp--;

            adaptor.addChild(root_0, type.getTree());
            name=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_interfaceOperationParam1575); 
            name_tree = (Object)adaptor.create(name);
            adaptor.addChild(root_0, name_tree);

            // smartidl.g:421:45: ( '=' value= literal )?
            int alt49=2;
            int LA49_0 = input.LA(1);

            if ( (LA49_0==42) ) {
                alt49=1;
            }
            switch (alt49) {
                case 1 :
                    // smartidl.g:421:46: '=' value= literal
                    {
                    char_literal121=(Token)input.LT(1);
                    match(input,42,FOLLOW_42_in_interfaceOperationParam1578); 
                    char_literal121_tree = (Object)adaptor.create(char_literal121);
                    adaptor.addChild(root_0, char_literal121_tree);

                    pushFollow(FOLLOW_literal_in_interfaceOperationParam1582);
                    value=literal();
                    _fsp--;

                    adaptor.addChild(root_0, value.getTree());

                    }
                    break;

            }

            // smartidl.g:421:66: (isSessionId= 'as' 'sessionid' )?
            int alt50=2;
            int LA50_0 = input.LA(1);

            if ( (LA50_0==27) ) {
                alt50=1;
            }
            switch (alt50) {
                case 1 :
                    // smartidl.g:421:67: isSessionId= 'as' 'sessionid'
                    {
                    isSessionId=(Token)input.LT(1);
                    match(input,27,FOLLOW_27_in_interfaceOperationParam1589); 
                    isSessionId_tree = (Object)adaptor.create(isSessionId);
                    adaptor.addChild(root_0, isSessionId_tree);

                    string_literal122=(Token)input.LT(1);
                    match(input,64,FOLLOW_64_in_interfaceOperationParam1591); 
                    string_literal122_tree = (Object)adaptor.create(string_literal122);
                    adaptor.addChild(root_0, string_literal122_tree);


                    }
                    break;

            }


            			IDLInterfaceOperationParam param = new IDLInterfaceOperationParam();
            			param.setName ( name.getText() );
            			param.setType ( type.idlDataType );
            			if ( value != null )
            				param.setDefaultValue ( input.toString(value.start,value.stop) );
            			if (isSessionId!=null)
            				param.setSessionId ( true );				
            				
            			idlOperation.getParams().add ( param );
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end interfaceOperationParam

    public static class operationThrowsDeclaration_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start operationThrowsDeclaration
    // smartidl.g:435:1: operationThrowsDeclaration[IDLInterfaceOperation idlOperation] : 'throws' exceptionList= qualifiedNameList ;
    public final operationThrowsDeclaration_return operationThrowsDeclaration(IDLInterfaceOperation idlOperation) throws RecognitionException {
        operationThrowsDeclaration_return retval = new operationThrowsDeclaration_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token string_literal123=null;
        qualifiedNameList_return exceptionList = null;


        Object string_literal123_tree=null;

        try {
            // smartidl.g:436:2: ( 'throws' exceptionList= qualifiedNameList )
            // smartidl.g:436:4: 'throws' exceptionList= qualifiedNameList
            {
            root_0 = (Object)adaptor.nil();

            string_literal123=(Token)input.LT(1);
            match(input,66,FOLLOW_66_in_operationThrowsDeclaration1611); 
            string_literal123_tree = (Object)adaptor.create(string_literal123);
            adaptor.addChild(root_0, string_literal123_tree);

            pushFollow(FOLLOW_qualifiedNameList_in_operationThrowsDeclaration1615);
            exceptionList=qualifiedNameList();
            _fsp--;

            adaptor.addChild(root_0, exceptionList.getTree());

            			idlOperation.setThrowsDeclLinks ( exceptionList.nameList );
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end operationThrowsDeclaration

    public static class qualifiedNameList_return extends ParserRuleReturnScope {
        public Collection<String> nameList;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start qualifiedNameList
    // smartidl.g:442:1: qualifiedNameList returns [ Collection<String> nameList ] : firstName= qualifiedName ( ',' nextName= qualifiedName )* ;
    public final qualifiedNameList_return qualifiedNameList() throws RecognitionException {
        qualifiedNameList_return retval = new qualifiedNameList_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token char_literal124=null;
        qualifiedName_return firstName = null;

        qualifiedName_return nextName = null;


        Object char_literal124_tree=null;


        	retval.nameList = new ArrayList < String > ();

        try {
            // smartidl.g:446:5: (firstName= qualifiedName ( ',' nextName= qualifiedName )* )
            // smartidl.g:446:9: firstName= qualifiedName ( ',' nextName= qualifiedName )*
            {
            root_0 = (Object)adaptor.nil();

            pushFollow(FOLLOW_qualifiedName_in_qualifiedNameList1647);
            firstName=qualifiedName();
            _fsp--;

            adaptor.addChild(root_0, firstName.getTree());
             retval.nameList.add(input.toString(firstName.start,firstName.stop)); 
            // smartidl.g:446:69: ( ',' nextName= qualifiedName )*
            loop51:
            do {
                int alt51=2;
                int LA51_0 = input.LA(1);

                if ( (LA51_0==49) ) {
                    alt51=1;
                }


                switch (alt51) {
            	case 1 :
            	    // smartidl.g:446:70: ',' nextName= qualifiedName
            	    {
            	    char_literal124=(Token)input.LT(1);
            	    match(input,49,FOLLOW_49_in_qualifiedNameList1652); 
            	    char_literal124_tree = (Object)adaptor.create(char_literal124);
            	    adaptor.addChild(root_0, char_literal124_tree);

            	    pushFollow(FOLLOW_qualifiedName_in_qualifiedNameList1656);
            	    nextName=qualifiedName();
            	    _fsp--;

            	    adaptor.addChild(root_0, nextName.getTree());
            	     retval.nameList.add(input.toString(nextName.start,nextName.stop)); 

            	    }
            	    break;

            	default :
            	    break loop51;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end qualifiedNameList

    public static class qualifiedName_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start qualifiedName
    // smartidl.g:453:1: qualifiedName : Identifier ( '.' Identifier )* ;
    public final qualifiedName_return qualifiedName() throws RecognitionException {
        qualifiedName_return retval = new qualifiedName_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token Identifier125=null;
        Token char_literal126=null;
        Token Identifier127=null;

        Object Identifier125_tree=null;
        Object char_literal126_tree=null;
        Object Identifier127_tree=null;

        try {
            // smartidl.g:454:5: ( Identifier ( '.' Identifier )* )
            // smartidl.g:454:9: Identifier ( '.' Identifier )*
            {
            root_0 = (Object)adaptor.nil();

            Identifier125=(Token)input.LT(1);
            match(input,Identifier,FOLLOW_Identifier_in_qualifiedName1688); 
            Identifier125_tree = (Object)adaptor.create(Identifier125);
            adaptor.addChild(root_0, Identifier125_tree);

            // smartidl.g:454:20: ( '.' Identifier )*
            loop52:
            do {
                int alt52=2;
                int LA52_0 = input.LA(1);

                if ( (LA52_0==67) ) {
                    alt52=1;
                }


                switch (alt52) {
            	case 1 :
            	    // smartidl.g:454:21: '.' Identifier
            	    {
            	    char_literal126=(Token)input.LT(1);
            	    match(input,67,FOLLOW_67_in_qualifiedName1691); 
            	    char_literal126_tree = (Object)adaptor.create(char_literal126);
            	    adaptor.addChild(root_0, char_literal126_tree);

            	    Identifier127=(Token)input.LT(1);
            	    match(input,Identifier,FOLLOW_Identifier_in_qualifiedName1693); 
            	    Identifier127_tree = (Object)adaptor.create(Identifier127);
            	    adaptor.addChild(root_0, Identifier127_tree);


            	    }
            	    break;

            	default :
            	    break loop52;
                }
            } while (true);


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end qualifiedName

    public static class literal_return extends ParserRuleReturnScope {
        public IDLPrimitiveType.TypeId typeId;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start literal
    // smartidl.g:457:1: literal returns [IDLPrimitiveType.TypeId typeId] : (intLit= integerLiteral | fpLit= floatingPointLiteral | CharacterLiteral | StringLiteral | booleanLiteral | 'null' );
    public final literal_return literal() throws RecognitionException {
        literal_return retval = new literal_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token CharacterLiteral128=null;
        Token StringLiteral129=null;
        Token string_literal131=null;
        integerLiteral_return intLit = null;

        floatingPointLiteral_return fpLit = null;

        booleanLiteral_return booleanLiteral130 = null;


        Object CharacterLiteral128_tree=null;
        Object StringLiteral129_tree=null;
        Object string_literal131_tree=null;

        try {
            // smartidl.g:458:5: (intLit= integerLiteral | fpLit= floatingPointLiteral | CharacterLiteral | StringLiteral | booleanLiteral | 'null' )
            int alt53=6;
            switch ( input.LA(1) ) {
            case HexLiteral:
            case OctalLiteral:
            case DecimalLiteral:
                {
                alt53=1;
                }
                break;
            case FloatingPointLiteral:
                {
                alt53=2;
                }
                break;
            case CharacterLiteral:
                {
                alt53=3;
                }
                break;
            case StringLiteral:
                {
                alt53=4;
                }
                break;
            case 69:
            case 70:
                {
                alt53=5;
                }
                break;
            case 68:
                {
                alt53=6;
                }
                break;
            default:
                NoViableAltException nvae =
                    new NoViableAltException("457:1: literal returns [IDLPrimitiveType.TypeId typeId] : (intLit= integerLiteral | fpLit= floatingPointLiteral | CharacterLiteral | StringLiteral | booleanLiteral | 'null' );", 53, 0, input);

                throw nvae;
            }

            switch (alt53) {
                case 1 :
                    // smartidl.g:458:9: intLit= integerLiteral
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_integerLiteral_in_literal1724);
                    intLit=integerLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, intLit.getTree());
                     retval.typeId = intLit.typeId; 

                    }
                    break;
                case 2 :
                    // smartidl.g:459:9: fpLit= floatingPointLiteral
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_floatingPointLiteral_in_literal1738);
                    fpLit=floatingPointLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, fpLit.getTree());
                     retval.typeId = fpLit.typeId; 

                    }
                    break;
                case 3 :
                    // smartidl.g:460:9: CharacterLiteral
                    {
                    root_0 = (Object)adaptor.nil();

                    CharacterLiteral128=(Token)input.LT(1);
                    match(input,CharacterLiteral,FOLLOW_CharacterLiteral_in_literal1750); 
                    CharacterLiteral128_tree = (Object)adaptor.create(CharacterLiteral128);
                    adaptor.addChild(root_0, CharacterLiteral128_tree);

                     retval.typeId = IDLPrimitiveType.TypeId.CHAR; 

                    }
                    break;
                case 4 :
                    // smartidl.g:461:9: StringLiteral
                    {
                    root_0 = (Object)adaptor.nil();

                    StringLiteral129=(Token)input.LT(1);
                    match(input,StringLiteral,FOLLOW_StringLiteral_in_literal1762); 
                    StringLiteral129_tree = (Object)adaptor.create(StringLiteral129);
                    adaptor.addChild(root_0, StringLiteral129_tree);

                     retval.typeId = IDLPrimitiveType.TypeId.STRING; 

                    }
                    break;
                case 5 :
                    // smartidl.g:462:9: booleanLiteral
                    {
                    root_0 = (Object)adaptor.nil();

                    pushFollow(FOLLOW_booleanLiteral_in_literal1774);
                    booleanLiteral130=booleanLiteral();
                    _fsp--;

                    adaptor.addChild(root_0, booleanLiteral130.getTree());
                     retval.typeId = IDLPrimitiveType.TypeId.BOOLEAN; 

                    }
                    break;
                case 6 :
                    // smartidl.g:463:9: 'null'
                    {
                    root_0 = (Object)adaptor.nil();

                    string_literal131=(Token)input.LT(1);
                    match(input,68,FOLLOW_68_in_literal1786); 
                    string_literal131_tree = (Object)adaptor.create(string_literal131);
                    adaptor.addChild(root_0, string_literal131_tree);

                     retval.typeId = IDLPrimitiveType.TypeId.NULL; 

                    }
                    break;

            }
            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end literal

    public static class integerLiteral_return extends ParserRuleReturnScope {
        public IDLPrimitiveType.TypeId typeId;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start integerLiteral
    // smartidl.g:466:1: integerLiteral returns [IDLPrimitiveType.TypeId typeId] : ( HexLiteral | OctalLiteral | DecimalLiteral ) (sfx= IntegerTypeSuffix )? ;
    public final integerLiteral_return integerLiteral() throws RecognitionException {
        integerLiteral_return retval = new integerLiteral_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token sfx=null;
        Token set132=null;

        Object sfx_tree=null;
        Object set132_tree=null;

        try {
            // smartidl.g:467:5: ( ( HexLiteral | OctalLiteral | DecimalLiteral ) (sfx= IntegerTypeSuffix )? )
            // smartidl.g:467:8: ( HexLiteral | OctalLiteral | DecimalLiteral ) (sfx= IntegerTypeSuffix )?
            {
            root_0 = (Object)adaptor.nil();

            set132=(Token)input.LT(1);
            if ( (input.LA(1)>=HexLiteral && input.LA(1)<=DecimalLiteral) ) {
                input.consume();
                adaptor.addChild(root_0, adaptor.create(set132));
                errorRecovery=false;
            }
            else {
                MismatchedSetException mse =
                    new MismatchedSetException(null,input);
                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_integerLiteral1810);    throw mse;
            }

            // smartidl.g:470:9: (sfx= IntegerTypeSuffix )?
            int alt54=2;
            int LA54_0 = input.LA(1);

            if ( (LA54_0==IntegerTypeSuffix) ) {
                alt54=1;
            }
            switch (alt54) {
                case 1 :
                    // smartidl.g:470:9: sfx= IntegerTypeSuffix
                    {
                    sfx=(Token)input.LT(1);
                    match(input,IntegerTypeSuffix,FOLLOW_IntegerTypeSuffix_in_integerLiteral1843); 
                    sfx_tree = (Object)adaptor.create(sfx);
                    adaptor.addChild(root_0, sfx_tree);


                    }
                    break;

            }


                		if ( sfx!=null ) {
                			retval.typeId = IDLPrimitiveType.TypeId.INT64;
                		}
                		else
                			retval.typeId = IDLPrimitiveType.TypeId.INT32;
                	

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end integerLiteral

    public static class booleanLiteral_return extends ParserRuleReturnScope {
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start booleanLiteral
    // smartidl.g:480:1: booleanLiteral : ( 'true' | 'false' );
    public final booleanLiteral_return booleanLiteral() throws RecognitionException {
        booleanLiteral_return retval = new booleanLiteral_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token set133=null;

        Object set133_tree=null;

        try {
            // smartidl.g:481:5: ( 'true' | 'false' )
            // smartidl.g:
            {
            root_0 = (Object)adaptor.nil();

            set133=(Token)input.LT(1);
            if ( (input.LA(1)>=69 && input.LA(1)<=70) ) {
                input.consume();
                adaptor.addChild(root_0, adaptor.create(set133));
                errorRecovery=false;
            }
            else {
                MismatchedSetException mse =
                    new MismatchedSetException(null,input);
                recoverFromMismatchedSet(input,mse,FOLLOW_set_in_booleanLiteral0);    throw mse;
            }


            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end booleanLiteral

    public static class floatingPointLiteral_return extends ParserRuleReturnScope {
        public IDLPrimitiveType.TypeId typeId;
        Object tree;
        public Object getTree() { return tree; }
    };

    // $ANTLR start floatingPointLiteral
    // smartidl.g:500:1: floatingPointLiteral returns [IDLPrimitiveType.TypeId typeId] : FloatingPointLiteral (sfx= FloatTypeSuffix )? ;
    public final floatingPointLiteral_return floatingPointLiteral() throws RecognitionException {
        floatingPointLiteral_return retval = new floatingPointLiteral_return();
        retval.start = input.LT(1);

        Object root_0 = null;

        Token sfx=null;
        Token FloatingPointLiteral134=null;

        Object sfx_tree=null;
        Object FloatingPointLiteral134_tree=null;

        try {
            // smartidl.g:501:2: ( FloatingPointLiteral (sfx= FloatTypeSuffix )? )
            // smartidl.g:501:4: FloatingPointLiteral (sfx= FloatTypeSuffix )?
            {
            root_0 = (Object)adaptor.nil();

            FloatingPointLiteral134=(Token)input.LT(1);
            match(input,FloatingPointLiteral,FOLLOW_FloatingPointLiteral_in_floatingPointLiteral2014); 
            FloatingPointLiteral134_tree = (Object)adaptor.create(FloatingPointLiteral134);
            adaptor.addChild(root_0, FloatingPointLiteral134_tree);

            // smartidl.g:501:28: (sfx= FloatTypeSuffix )?
            int alt55=2;
            int LA55_0 = input.LA(1);

            if ( (LA55_0==FloatTypeSuffix) ) {
                alt55=1;
            }
            switch (alt55) {
                case 1 :
                    // smartidl.g:501:28: sfx= FloatTypeSuffix
                    {
                    sfx=(Token)input.LT(1);
                    match(input,FloatTypeSuffix,FOLLOW_FloatTypeSuffix_in_floatingPointLiteral2018); 
                    sfx_tree = (Object)adaptor.create(sfx);
                    adaptor.addChild(root_0, sfx_tree);


                    }
                    break;

            }


            			retval.typeId = IDLPrimitiveType.TypeId.FLOAT;
               			if(sfx!=null && sfx.getText().equalsIgnoreCase("d")) {
               				retval.typeId = IDLPrimitiveType.TypeId.DOUBLE;
               			} 
            		

            }

            retval.stop = input.LT(-1);

                retval.tree = (Object)adaptor.rulePostProcessing(root_0);
                adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);

        }
         
          catch (RecognitionException e) { 
            throw e; 
          } 
        finally {
        }
        return retval;
    }
    // $ANTLR end floatingPointLiteral


 

    public static final BitSet FOLLOW_namespaceDeclaration_in_startCompilation76 = new BitSet(new long[]{0xE900000006000000L});
    public static final BitSet FOLLOW_importDeclarationList_in_startCompilation82 = new BitSet(new long[]{0xE900000004000000L});
    public static final BitSet FOLLOW_globalDeclarationList_in_startCompilation88 = new BitSet(new long[]{0x0000000000000000L});
    public static final BitSet FOLLOW_EOF_in_startCompilation94 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_23_in_namespaceDeclaration109 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedName_in_namespaceDeclaration111 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_namespaceDeclaration113 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_25_in_importDeclaration133 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedName_in_importDeclaration135 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_importDeclaration137 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_importDeclaration_in_importDeclarationList155 = new BitSet(new long[]{0x0000000002000002L});
    public static final BitSet FOLLOW_globalDeclaration_in_globalDeclarationList174 = new BitSet(new long[]{0xE900000004000002L});
    public static final BitSet FOLLOW_typedefDeclaration_in_globalDeclaration200 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_enumDeclaration_in_globalDeclaration213 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_structureDeclaration_in_globalDeclaration227 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_exceptionDeclaration_in_globalDeclaration238 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_choiceDeclaration_in_globalDeclaration252 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_interfaceDeclaration_in_globalDeclaration266 = new BitSet(new long[]{0x0000000001000002L});
    public static final BitSet FOLLOW_24_in_globalDeclaration281 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_26_in_typedefDeclaration304 = new BitSet(new long[]{0x0068F9FF70000010L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_typedefDeclaration308 = new BitSet(new long[]{0x0000000008000000L});
    public static final BitSet FOLLOW_27_in_typedefDeclaration310 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_typedefDeclaration314 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_28_in_datatypeDeclaration341 = new BitSet(new long[]{0x0068F9FF60000010L});
    public static final BitSet FOLLOW_29_in_datatypeDeclaration349 = new BitSet(new long[]{0x0068F9FF40000010L});
    public static final BitSet FOLLOW_primitiveType_in_datatypeDeclaration364 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_complexType_in_datatypeDeclaration374 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_qualifiedName_in_datatypeDeclaration383 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_arrayDeclaration_in_complexType410 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_listDeclaration_in_complexType417 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_mapDeclaration_in_complexType424 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_complexType433 = new BitSet(new long[]{0x0068000040000000L});
    public static final BitSet FOLLOW_complexType_in_complexType439 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_complexType441 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_32_in_primitiveType470 = new BitSet(new long[]{0x0000001E00000000L});
    public static final BitSet FOLLOW_33_in_primitiveType483 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_34_in_primitiveType496 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_35_in_primitiveType510 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_36_in_primitiveType524 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_integerTypeConstraint_in_primitiveType548 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_37_in_primitiveType563 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_integerTypeConstraint_in_primitiveType568 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_38_in_primitiveType597 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_39_in_primitiveType608 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_floatTypeConstraint_in_primitiveType623 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_40_in_primitiveType641 = new BitSet(new long[]{0x0000020040000002L});
    public static final BitSet FOLLOW_41_in_primitiveType651 = new BitSet(new long[]{0x0000040000000000L});
    public static final BitSet FOLLOW_42_in_primitiveType653 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_primitiveType657 = new BitSet(new long[]{0x0000000040000002L});
    public static final BitSet FOLLOW_floatTypeConstraint_in_primitiveType676 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_43_in_primitiveType691 = new BitSet(new long[]{0x0000100000000000L});
    public static final BitSet FOLLOW_44_in_primitiveType697 = new BitSet(new long[]{0x0004000040000002L});
    public static final BitSet FOLLOW_stringSizeConstraint_in_primitiveType704 = new BitSet(new long[]{0x0004000000000002L});
    public static final BitSet FOLLOW_stringMaskConstraint_in_primitiveType713 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_43_in_primitiveType730 = new BitSet(new long[]{0x0000200000000000L});
    public static final BitSet FOLLOW_45_in_primitiveType736 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_46_in_primitiveType747 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_47_in_primitiveType756 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_integerTypeConstraint785 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_integerTypeConstraint792 = new BitSet(new long[]{0x0003000080000000L});
    public static final BitSet FOLLOW_48_in_integerTypeConstraint797 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_integerTypeConstraint801 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_49_in_integerTypeConstraint814 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_integerTypeConstraint818 = new BitSet(new long[]{0x0003000080000000L});
    public static final BitSet FOLLOW_48_in_integerTypeConstraint823 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_integerTypeConstraint827 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_31_in_integerTypeConstraint839 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_floatTypeConstraint860 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_floatingPointLiteral_in_floatTypeConstraint867 = new BitSet(new long[]{0x0003000080000000L});
    public static final BitSet FOLLOW_48_in_floatTypeConstraint872 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_floatingPointLiteral_in_floatTypeConstraint876 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_49_in_floatTypeConstraint888 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_floatingPointLiteral_in_floatTypeConstraint892 = new BitSet(new long[]{0x0003000080000000L});
    public static final BitSet FOLLOW_48_in_floatTypeConstraint897 = new BitSet(new long[]{0x0000000000002000L});
    public static final BitSet FOLLOW_floatingPointLiteral_in_floatTypeConstraint901 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_31_in_floatTypeConstraint913 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_30_in_stringSizeConstraint933 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_stringSizeConstraint937 = new BitSet(new long[]{0x0001000080000000L});
    public static final BitSet FOLLOW_48_in_stringSizeConstraint942 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_stringSizeConstraint946 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_stringSizeConstraint953 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_50_in_stringMaskConstraint976 = new BitSet(new long[]{0x0000000040000000L});
    public static final BitSet FOLLOW_30_in_stringMaskConstraint978 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_StringLiteral_in_stringMaskConstraint982 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_49_in_stringMaskConstraint987 = new BitSet(new long[]{0x0000000000000020L});
    public static final BitSet FOLLOW_StringLiteral_in_stringMaskConstraint991 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_31_in_stringMaskConstraint997 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_51_in_arrayDeclaration1010 = new BitSet(new long[]{0x0000000040000000L});
    public static final BitSet FOLLOW_30_in_arrayDeclaration1012 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_arrayDeclaration1016 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_arrayDeclaration1018 = new BitSet(new long[]{0x0010000000000000L});
    public static final BitSet FOLLOW_52_in_arrayDeclaration1020 = new BitSet(new long[]{0x0068F9FF70000010L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_arrayDeclaration1026 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_53_in_listDeclaration1043 = new BitSet(new long[]{0x0010000040000000L});
    public static final BitSet FOLLOW_30_in_listDeclaration1046 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_listDeclaration1050 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_listDeclaration1052 = new BitSet(new long[]{0x0010000000000000L});
    public static final BitSet FOLLOW_52_in_listDeclaration1056 = new BitSet(new long[]{0x0068F9FF70000010L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_listDeclaration1062 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_54_in_mapDeclaration1079 = new BitSet(new long[]{0x0010000040000000L});
    public static final BitSet FOLLOW_30_in_mapDeclaration1082 = new BitSet(new long[]{0x0000000000000380L});
    public static final BitSet FOLLOW_integerLiteral_in_mapDeclaration1086 = new BitSet(new long[]{0x0000000080000000L});
    public static final BitSet FOLLOW_31_in_mapDeclaration1088 = new BitSet(new long[]{0x0010000000000000L});
    public static final BitSet FOLLOW_52_in_mapDeclaration1092 = new BitSet(new long[]{0x0068F9FF70000010L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_mapDeclaration1098 = new BitSet(new long[]{0x0080000000000000L});
    public static final BitSet FOLLOW_55_in_mapDeclaration1100 = new BitSet(new long[]{0x0000F9FF00000000L});
    public static final BitSet FOLLOW_primitiveType_in_mapDeclaration1106 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_56_in_enumDeclaration1130 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_enumDeclaration1134 = new BitSet(new long[]{0x0200000000000000L});
    public static final BitSet FOLLOW_57_in_enumDeclaration1138 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_enumItem_in_enumDeclaration1140 = new BitSet(new long[]{0x0402000000000000L});
    public static final BitSet FOLLOW_49_in_enumDeclaration1144 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_enumItem_in_enumDeclaration1146 = new BitSet(new long[]{0x0402000000000000L});
    public static final BitSet FOLLOW_58_in_enumDeclaration1151 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_Identifier_in_enumItem1167 = new BitSet(new long[]{0x0000040000000002L});
    public static final BitSet FOLLOW_42_in_enumItem1170 = new BitSet(new long[]{0x00000000000023E0L,0x0000000000000070L});
    public static final BitSet FOLLOW_literal_in_enumItem1174 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_59_in_structureDeclaration1199 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_structureDeclaration1203 = new BitSet(new long[]{0x1200000000000000L});
    public static final BitSet FOLLOW_60_in_structureDeclaration1206 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedNameList_in_structureDeclaration1210 = new BitSet(new long[]{0x0200000000000000L});
    public static final BitSet FOLLOW_57_in_structureDeclaration1214 = new BitSet(new long[]{0x0468F9FF70000010L});
    public static final BitSet FOLLOW_structureItem_in_structureDeclaration1217 = new BitSet(new long[]{0x0468F9FF70000010L});
    public static final BitSet FOLLOW_58_in_structureDeclaration1222 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_structureItem1241 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_structureItem1245 = new BitSet(new long[]{0x0000040001000000L});
    public static final BitSet FOLLOW_42_in_structureItem1248 = new BitSet(new long[]{0x00000000000023E0L,0x0000000000000070L});
    public static final BitSet FOLLOW_literal_in_structureItem1252 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_structureItem1256 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_61_in_exceptionDeclaration1280 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_exceptionDeclaration1284 = new BitSet(new long[]{0x1200000000000000L});
    public static final BitSet FOLLOW_60_in_exceptionDeclaration1287 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedName_in_exceptionDeclaration1291 = new BitSet(new long[]{0x0200000000000000L});
    public static final BitSet FOLLOW_57_in_exceptionDeclaration1295 = new BitSet(new long[]{0x0468F9FF70000010L});
    public static final BitSet FOLLOW_exceptionItem_in_exceptionDeclaration1298 = new BitSet(new long[]{0x0468F9FF70000010L});
    public static final BitSet FOLLOW_58_in_exceptionDeclaration1303 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_exceptionItem1322 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_exceptionItem1326 = new BitSet(new long[]{0x0000040001000000L});
    public static final BitSet FOLLOW_42_in_exceptionItem1329 = new BitSet(new long[]{0x00000000000023E0L,0x0000000000000070L});
    public static final BitSet FOLLOW_literal_in_exceptionItem1333 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_exceptionItem1337 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_62_in_choiceDeclaration1360 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_choiceDeclaration1364 = new BitSet(new long[]{0x1200000000000000L});
    public static final BitSet FOLLOW_60_in_choiceDeclaration1367 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedNameList_in_choiceDeclaration1371 = new BitSet(new long[]{0x0200000000000000L});
    public static final BitSet FOLLOW_57_in_choiceDeclaration1375 = new BitSet(new long[]{0x0468F9FF70000010L});
    public static final BitSet FOLLOW_choiceItem_in_choiceDeclaration1378 = new BitSet(new long[]{0x0468F9FF70000010L});
    public static final BitSet FOLLOW_58_in_choiceDeclaration1383 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_choiceItem1402 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_choiceItem1406 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_choiceItem1408 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_63_in_interfaceDeclaration1432 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_interfaceDeclaration1436 = new BitSet(new long[]{0x1200000000000000L});
    public static final BitSet FOLLOW_60_in_interfaceDeclaration1439 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedNameList_in_interfaceDeclaration1443 = new BitSet(new long[]{0x0200000000000000L});
    public static final BitSet FOLLOW_57_in_interfaceDeclaration1448 = new BitSet(new long[]{0x0468F9FF70000010L,0x0000000000000002L});
    public static final BitSet FOLLOW_interfaceOperation_in_interfaceDeclaration1451 = new BitSet(new long[]{0x0468F9FF70000010L,0x0000000000000002L});
    public static final BitSet FOLLOW_58_in_interfaceDeclaration1456 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_interfaceOperationResult_in_interfaceOperation1478 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_interfaceOperation1483 = new BitSet(new long[]{0x0000000040000000L});
    public static final BitSet FOLLOW_30_in_interfaceOperation1485 = new BitSet(new long[]{0x006AF9FFF0000010L});
    public static final BitSet FOLLOW_interfaceOperationParam_in_interfaceOperation1488 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_49_in_interfaceOperation1494 = new BitSet(new long[]{0x0068F9FF70000010L});
    public static final BitSet FOLLOW_interfaceOperationParam_in_interfaceOperation1496 = new BitSet(new long[]{0x0002000080000000L});
    public static final BitSet FOLLOW_31_in_interfaceOperation1501 = new BitSet(new long[]{0x0000000001000000L,0x0000000000000004L});
    public static final BitSet FOLLOW_operationThrowsDeclaration_in_interfaceOperation1504 = new BitSet(new long[]{0x0000000001000000L});
    public static final BitSet FOLLOW_24_in_interfaceOperation1510 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_interfaceOperationResult1531 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_27_in_interfaceOperationResult1536 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L});
    public static final BitSet FOLLOW_64_in_interfaceOperationResult1538 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_65_in_interfaceOperationResult1555 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_datatypeDeclaration_in_interfaceOperationParam1571 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_interfaceOperationParam1575 = new BitSet(new long[]{0x0000040008000002L});
    public static final BitSet FOLLOW_42_in_interfaceOperationParam1578 = new BitSet(new long[]{0x00000000000023E0L,0x0000000000000070L});
    public static final BitSet FOLLOW_literal_in_interfaceOperationParam1582 = new BitSet(new long[]{0x0000000008000002L});
    public static final BitSet FOLLOW_27_in_interfaceOperationParam1589 = new BitSet(new long[]{0x0000000000000000L,0x0000000000000001L});
    public static final BitSet FOLLOW_64_in_interfaceOperationParam1591 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_66_in_operationThrowsDeclaration1611 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedNameList_in_operationThrowsDeclaration1615 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_qualifiedName_in_qualifiedNameList1647 = new BitSet(new long[]{0x0002000000000002L});
    public static final BitSet FOLLOW_49_in_qualifiedNameList1652 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_qualifiedName_in_qualifiedNameList1656 = new BitSet(new long[]{0x0002000000000002L});
    public static final BitSet FOLLOW_Identifier_in_qualifiedName1688 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000008L});
    public static final BitSet FOLLOW_67_in_qualifiedName1691 = new BitSet(new long[]{0x0000000000000010L});
    public static final BitSet FOLLOW_Identifier_in_qualifiedName1693 = new BitSet(new long[]{0x0000000000000002L,0x0000000000000008L});
    public static final BitSet FOLLOW_integerLiteral_in_literal1724 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_floatingPointLiteral_in_literal1738 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_CharacterLiteral_in_literal1750 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_StringLiteral_in_literal1762 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_booleanLiteral_in_literal1774 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_68_in_literal1786 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_integerLiteral1810 = new BitSet(new long[]{0x0000000000000402L});
    public static final BitSet FOLLOW_IntegerTypeSuffix_in_integerLiteral1843 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_set_in_booleanLiteral0 = new BitSet(new long[]{0x0000000000000002L});
    public static final BitSet FOLLOW_FloatingPointLiteral_in_floatingPointLiteral2014 = new BitSet(new long[]{0x0000000000004002L});
    public static final BitSet FOLLOW_FloatTypeSuffix_in_floatingPointLiteral2018 = new BitSet(new long[]{0x0000000000000002L});

}